diff --git a/phishflood/__main__.py b/phishflood/__main__.py index ca2c069..b99f30d 100644 --- a/phishflood/__main__.py +++ b/phishflood/__main__.py @@ -229,7 +229,7 @@ def extract_inputs_from_url(url: str) -> Optional[Dict[str, Any]]: json=raw_form, headers=auth_headers, ) - print(f"Uploaded form: {res.status_code}, {res.text}") + print(f"Uploaded form: {res.status_code}") for input_ in form["inputs"]: print(f"Uploading input {input_}") diff --git a/phishings/migrations/0007_remove_form_page.py b/phishings/migrations/0007_remove_form_page.py new file mode 100644 index 0000000..9b0195d --- /dev/null +++ b/phishings/migrations/0007_remove_form_page.py @@ -0,0 +1,16 @@ +# Generated by Django 5.0 on 2024-01-15 15:51 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("phishings", "0006_form_page"), + ] + + operations = [ + migrations.RemoveField( + model_name="form", + name="page", + ), + ] diff --git a/phishings/migrations/0008_form_page.py b/phishings/migrations/0008_form_page.py new file mode 100644 index 0000000..8af785e --- /dev/null +++ b/phishings/migrations/0008_form_page.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0 on 2024-01-15 15:52 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("phishings", "0007_remove_form_page"), + ] + + operations = [ + migrations.AddField( + model_name="form", + name="page", + field=models.IntegerField(default=0), + preserve_default=False, + ), + ] diff --git a/phishings/models.py b/phishings/models.py index b955d13..94f64ca 100644 --- a/phishings/models.py +++ b/phishings/models.py @@ -12,6 +12,9 @@ class Phishing(models.Model): def save(self, *args, **kwargs): self.id = hashlib.sha256(self.url.encode("utf-8")).hexdigest() super(Phishing, self).save(*args, **kwargs) + + def __str__(self) -> str: + return f"" class Form(models.Model): @@ -22,16 +25,19 @@ class Form(models.Model): Phishing, on_delete=models.CASCADE, related_name="forms" ) meta_id = models.IntegerField() - page = models.IntegerField() html_id = models.CharField(max_length=255, null=True) html_action = models.CharField(max_length=255, null=True) html_method = models.CharField(max_length=255, null=True) html_type = models.CharField(max_length=255, null=True) + page = models.IntegerField(blank=False, null=False) def save(self, *args, **kwargs): self.id = f"{self.phishing.id}-{self.page}-{self.meta_id}" super(Form, self).save(*args, **kwargs) + + def __str__(self) -> str: + return f"" class Input(models.Model): @@ -51,6 +57,9 @@ class Input(models.Model): def save(self, *args, **kwargs): self.id = f"{self.form.id}-{self.meta_id}" super(Input, self).save(*args, **kwargs) + + def __str__(self) -> str: + return f"" class Action(models.Model): @@ -63,3 +72,6 @@ class Action(models.Model): value = models.CharField(max_length=255, blank=True, null=True) status = models.CharField(max_length=255) created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self) -> str: + return f"" diff --git a/phishings/serializers.py b/phishings/serializers.py index 6911862..b662bd0 100644 --- a/phishings/serializers.py +++ b/phishings/serializers.py @@ -26,6 +26,7 @@ class Meta: model = Form fields = [ "phishing", + "page", "meta_id", "html_id", "html_action", diff --git a/samples/info.json b/samples/info.json index c28c026..2ac3e68 100644 --- a/samples/info.json +++ b/samples/info.json @@ -187,7 +187,7 @@ "page": 0, "form": 0, "input": 1, - "value": "jmars34", + "value": "anhtotinh", "status": "success" }, { @@ -203,7 +203,7 @@ "page": 0, "form": 0, "input": 3, - "value": "hip-hoper", + "value": "078289157", "status": "success" }, { @@ -219,7 +219,7 @@ "page": 1, "form": 0, "input": 1, - "value": "gqkxinfuhh", + "value": "cplpfmgmhu", "status": "success" }, { @@ -227,7 +227,7 @@ "page": 1, "form": 0, "input": 2, - "value": "loren1994", + "value": "haikevein1", "status": "success" }, { diff --git a/samples/output.gif b/samples/output.gif index 927d19b..d38204e 100644 Binary files a/samples/output.gif and b/samples/output.gif differ