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

Multithreading Implementation in Facebook Brute Force Tool #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kaleemullahqasim
Copy link

Modifications Made:
Thread Division: The list of passwords is divided into chunks, with each chunk assigned to a separate thread. The number of threads (e.g., 10) can be adjusted based on the desired level of concurrency.

Separate State for Each Thread: To ensure that each thread works independently, separate payloads and cookies are maintained for each thread. This prevents conflicts and ensures proper synchronization between threads.

Password Attempt Function: The function password_attempt_chunk was introduced to handle password attempts for each chunk of passwords. It iteratively tries passwords in its assigned chunk and stops if a successful login is found or if the chunk is exhausted.

Synchronization: A lock is used to synchronize the threads, particularly when a successful password is found. This ensures that once a password is found by one thread, the other threads are informed, and they can stop their attempts.

Main Function: The main function main() orchestrates the creation of threads, division of passwords into chunks, and initiation of the concurrent password attempts. It also waits for all threads to complete before finishing the program.

Results:
The implementation of multithreading enhances the speed of the brute force attack by enabling simultaneous password attempts. This parallelization can significantly reduce the time required to find the correct password, especially when dealing with a large list of potential passwords.

Important Note:
While multithreading improves efficiency, it also requires careful handling to avoid issues like race conditions and deadlocks. The provided implementation takes these factors into account.

Ethical Considerations:
It's crucial to note that this tool and the associated multithreading enhancement should only be used for legal and ethical purposes, such as testing the security of accounts with proper authorization. Misuse of this tool for unauthorized access to accounts is against the law and unethical.

Modifications Made:
Thread Division: The list of passwords is divided into chunks, with each chunk assigned to a separate thread. The number of threads (e.g., 10) can be adjusted based on the desired level of concurrency.

Separate State for Each Thread: To ensure that each thread works independently, separate payloads and cookies are maintained for each thread. This prevents conflicts and ensures proper synchronization between threads.

Password Attempt Function: The function password_attempt_chunk was introduced to handle password attempts for each chunk of passwords. It iteratively tries passwords in its assigned chunk and stops if a successful login is found or if the chunk is exhausted.

Synchronization: A lock is used to synchronize the threads, particularly when a successful password is found. This ensures that once a password is found by one thread, the other threads are informed, and they can stop their attempts.

Main Function: The main function main() orchestrates the creation of threads, division of passwords into chunks, and initiation of the concurrent password attempts. It also waits for all threads to complete before finishing the program.

Results:
The implementation of multithreading enhances the speed of the brute force attack by enabling simultaneous password attempts. This parallelization can significantly reduce the time required to find the correct password, especially when dealing with a large list of potential passwords.

Important Note:
While multithreading improves efficiency, it also requires careful handling to avoid issues like race conditions and deadlocks. The provided implementation takes these factors into account.

Ethical Considerations:
It's crucial to note that this tool and the associated multithreading enhancement should only be used for legal and ethical purposes, such as testing the security of accounts with proper authorization. Misuse of this tool for unauthorized access to accounts is against the law and unethical.
Copy link

@imrane-bit imrane-bit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked , good and safe implementation

@Kaleemullahqasim
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants