Skip to content

Create New Shepherd Level Entry

markdenihan edited this page Apr 29, 2014 · 20 revisions
  1. Build your level (Easier said than done)
  2. Open a securityShepherd core mysql instance (root / CowSaysMoo)
  3. Run the following procude, filling in the fields

call moduleCreate('', 'lesson/challenge', '', 'theModuleSolution');

  1. Copy the levelTemplate.jsp in OwaspSecurityShepherdExposed/jsp
  2. Fill out as much information as you can
  3. Be careful of double quotes. Because you are populating double quote encapsulated strings.
  4. If you are going to write your own HTML and do not want to use the template levelBlurb section, remove the levelBlurb scriptlet from the contentDiv section of the page and put your stuff there
  5. Go to the Live Shepherd environment and sign in as an Admin
  6. Navigate to Admin -> Module Management -> Create Level
  7. Fill in level information and click submit
  8. Record the Level hash, and add it into the "levelHash" parameter of the levelTemplate
  9. Rename the template to the levelHash.jsp
  10. It is an offline level zip the level into a "DownloadMe.zip" zip archive
  11. Put the archive in a folder named levelHash
  12. Pull down the latest code from the HSS git repository
  13. Add the jsp page to SecurityShepherdExposed/src/jsp/lessons/
  14. Add the folder to SecurityShepherdExposed/src/jsp/lessons/
  15. Add the outputted INSERT command from the Create Level function you ran on Shepherd to the SecurityShepherdCore/database/masterSheama.sql file in the HSS git repo. Review the statement first. Make sure it is valid. And make sure you add where the rest of the inserts are there for modules (line 1500)
  16. Push your updates and your level will be live when the Exposed Server is redeployed

It is recommended that you test your level on your local deployment. To set up your local instance of shepherd follow these steps. To test your level you will need to run the SQL command you added to the masterSchema.sql on your MySQL server