Mas avances en el explorer

This commit is contained in:
pablomartincalvo 2018-08-14 20:02:40 +02:00
parent 7e8daab6ce
commit e466986721
3 changed files with 60 additions and 49 deletions

View file

@ -30,8 +30,6 @@ class DatabaseWrapper():
def disconnect(self):
if self.connection.is_connected():
self.connection.disconnect()
else:
print("Connection was not active.")
def ping(self):
self.connect()

View file

@ -20,8 +20,8 @@ class UrlAttack():
def attack(self):
self.has_been_attacked = True
try:
self.response = requests.get(self.url, headers = headers,
timeout = timeout)
self.response = requests.get(self.url, headers = self.headers,
timeout = self.timeout)
if self.response.ok:
self.success = True
except Exception: