from data.exploits.base.BasicExploit import BasicExploit
from settings import mapped_port_host

class Exploit(BasicExploit):

	attributes = {
		  "Name" : "Nodegoat_login",
		  "Description" : "",
		  "Target" : "nodegoat",
		  "Container" : "ubuntu-node-mongo",
		  "Type" : ""
	}

	def runExploit(self):
		wrapper = self.wrapper
		wrapper.navigate("http://localhost:%s/signup" % mapped_port_host)
		wrapper.find("userName").keys("goat")
		wrapper.find("firstName").keys("John")
		wrapper.find("lastName").keys("Doe")
		wrapper.find("password").keys("123")
		wrapper.find("verify").keys("123")
		wrapper.find("button.btn.btn-primary").click()
