Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add payload counter #7

Open
EwyBoy opened this issue Mar 3, 2024 · 4 comments
Open

[Feature] Add payload counter #7

EwyBoy opened this issue Mar 3, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@EwyBoy
Copy link
Owner

EwyBoy commented Mar 3, 2024

In reference to #4

Add a counter for each successful payload sent to the target

@EwyBoy EwyBoy self-assigned this Mar 3, 2024
@EwyBoy EwyBoy added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Mar 3, 2024
@gridl0ck
Copy link

gridl0ck commented Mar 5, 2024

I am currently working on implementing this for the tool and was wondering how youd feel about using the logging package instead of print statements? I have an instance running (using a simple http server to test it that only sends 200 responses to all requests) and replaced the print statements with a logger, and added mutex locks for accessing the new class members that hold the successful and running numbers inside of the CredentialTester Class, since this is threaded.

@gridl0ck
Copy link

gridl0ck commented Mar 7, 2024

2024-03-07 15:07:04,021 - INFO - Starting with 5 threads and URL: http://localhost:25565/...
2024-03-07 15:07:06,060 - INFO - SUCCESS -- [Record: 0] -- 200 -- OK - {'example_payload': 'This is an example payload, capture the request and replace it with your own', 'user[email]': '[email protected]', 'user[password]': 'leaven5'}
2024-03-07 15:07:06,061 - INFO - SUCCESS -- [Record: 1] -- 200 -- OK - {'example_payload': 'This is an example payload, capture the request and replace it with your own', 'user[email]': '[email protected]', 'user[password]': 'withe'}
2024-03-07 15:07:06,062 - INFO - SUCCESS -- [Record: 2] -- 200 -- OK - {'example_payload': 'This is an example payload, capture the request and replace it with your own', 'user[email]': '[email protected]', 'user[password]': None}
2024-03-07 15:07:06,063 - INFO - SUCCESS -- [Record: 3] -- 200 -- OK - {'example_payload': 'This is an example payload, capture the request and replace it with your own', 'user[email]': '[email protected]', 'user[password]': '18121998'}
2024-03-07 15:07:06,063 - INFO - SUCCESS -- [Record: 4] -- 200 -- OK - {'example_payload': 'This is an example payload, capture the request and replace it with your own', 'user[email]': '[email protected]', 'user[password]': 'Payne9'}
2024-03-07 15:07:08,088 - INFO - SUCCESS -- [Record: 5] -- 200 -- OK - {'example_payload': 'This is an example payload, capture the request and replace it with your own', 'user[email]': '[email protected]', 'user[password]': 'zetazeta'}
2024-03-07 15:07:08,088 - INFO - SUCCESS -- [Record: 6] -- 200 -- OK - {'example_payload': 'This is an example payload, capture the request and replace it with your own', 'user[email]': '[email protected]', 'user[password]': 'lachlan'}
2024-03-07 15:07:08,103 - INFO - SUCCESS -- [Record: 7] -- 200 -- OK - {'example_payload': 'This is an example payload, capture the request and replace it with your own', 'user[email]': '[email protected]', 'user[password]': '10121997'}
2024-03-07 15:07:08,104 - INFO - SUCCESS -- [Record: 8] -- 200 -- OK - {'example_payload': 'This is an example payload, capture the request and replace it with your own', 'user[email]': '[email protected]', 'user[password]': '130468'}
2024-03-07 15:07:08,105 - INFO - SUCCESS -- [Record: 9] -- 200 -- OK - {'example_payload': 'This is an example payload, capture the request and replace it with your own', 'user[email]': '[email protected]', 'user[password]': 'elcid'}
2024-03-07 15:07:12,156 - INFO - --------------------
2024-03-07 15:07:12,156 - INFO - TOTAL Records Sent: 10. Total Successful Records Sent: 10
2024-03-07 15:07:12,156 - INFO - Successful Records:
----------------
{"record": 0, "form-data": {"example_payload": "This is an example payload, capture the request and replace it with your own", "user[email]": "[email protected]", "user[password]": "leaven5"}},
{"record": 1, "form-data": {"example_payload": "This is an example payload, capture the request and replace it with your own", "user[email]": "[email protected]", "user[password]": "withe"}},
{"record": 2, "form-data": {"example_payload": "This is an example payload, capture the request and replace it with your own", "user[email]": "[email protected]", "user[password]": null}},
{"record": 3, "form-data": {"example_payload": "This is an example payload, capture the request and replace it with your own", "user[email]": "[email protected]", "user[password]": "18121998"}},
{"record": 4, "form-data": {"example_payload": "This is an example payload, capture the request and replace it with your own", "user[email]": "[email protected]", "user[password]": "Payne9"}},
{"record": 5, "form-data": {"example_payload": "This is an example payload, capture the request and replace it with your own", "user[email]": "[email protected]", "user[password]": "zetazeta"}},
{"record": 6, "form-data": {"example_payload": "This is an example payload, capture the request and replace it with your own", "user[email]": "[email protected]", "user[password]": "lachlan"}},
{"record": 7, "form-data": {"example_payload": "This is an example payload, capture the request and replace it with your own", "user[email]": "[email protected]", "user[password]": "10121997"}},
{"record": 8, "form-data": {"example_payload": "This is an example payload, capture the request and replace it with your own", "user[email]": "[email protected]", "user[password]": "130468"}},
{"record": 9, "form-data": {"example_payload": "This is an example payload, capture the request and replace it with your own", "user[email]": "[email protected]", "user[password]": "elcid"}}

Here is some example output. I am still currently working on a graceful way to end the program.

@EwyBoy
Copy link
Owner Author

EwyBoy commented Mar 9, 2024

That is really cool, definitely need to implement a proper logger.
Feel free to create a PR if you have some preference on how the logger is implemented.

@gridl0ck
Copy link

I most certainly will! I will add a few comments and we can refine it to meet the intent of the individual who requested it, as well as to your own specifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants