Wednesday, 23 October 2013

WebGoat.net set up

I was setting up WebGoat.net on my machine. Offcourse there is Dinis's good blog on this(http://blog.diniscruz.com/2013/06/webgoatnet-in-action-and-how-i-set-it-up.html). But still i ran into the following issues

1. After i downloaded the code i did not know what is sqlite3. I downloaded it from their site. I downloaded the code and the dll

2. I downloaded the code and rebuilt it using visual studio to get the sqlite3.exe

3. I placed the dll in bin and i placed the sqlite3.exe in ...\WebGoat.NET-master\WebGoat.NET-master\WebGoat\DB_Scripts

4. I ran into issues at this line of code in SqliteDbProvider.cs
SqliteConnection .CreateFile(_dbFileName);

It threw a permission error. That is becase the _dbFileName points to a folder and not a file.

5. What is expected here is the DB name. I gave the name as classicmodels.db

6. You need to specify the name in Default.config

7. I browsed to ...\WebGoat.NET-master\WebGoat.NET-master\WebGoat\DB_Scripts form the command prompt , here i created the DB with the following command
> sqlite3 classicmodels.db

8. Then i created the db with the following command
> .read create_webgoatcoins_sqlite3.sql
it did not work the first time, hence i executed it again as a true progammer and without knowing why
> .read create_webgoatcoins_sqlite3.sql

Bingo it created the db

9. Then i tried to load the data by running
> .read load_webgoatcoins_sqlite3.sql

it errored out . No matter how many times!

10. Then i went to the UI and clicked on Rebuild database and bingo i was on my Suzuki Samurai(the bike by work no problem)



 


No comments:

Post a Comment