{"id":20512723,"url":"https://github.com/cmarker0/C_Exam","last_synced_at":"2025-09-25T10:30:22.930Z","repository":{"id":122681570,"uuid":"154652595","full_name":"MiniMarker/C_Exam","owner":"MiniMarker","description":"Exam soulution for PG3400-H18 - Password cracking using MD5 hash algoritm","archived":false,"fork":false,"pushed_at":"2018-11-09T00:12:10.000Z","size":4362,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-15T20:43:40.017Z","etag":null,"topics":["bruteforce","c","dictionary","exam","hash","makefile","password-cracker"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MiniMarker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-25T10:30:31.000Z","updated_at":"2020-11-02T22:18:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d171ea7-9a0f-4a26-97b2-9bee8c0b1ce8","html_url":"https://github.com/MiniMarker/C_Exam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiniMarker%2FC_Exam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiniMarker%2FC_Exam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiniMarker%2FC_Exam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiniMarker%2FC_Exam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MiniMarker","download_url":"https://codeload.github.com/MiniMarker/C_Exam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234177220,"owners_count":18791614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bruteforce","c","dictionary","exam","hash","makefile","password-cracker"],"created_at":"2024-11-15T20:42:26.592Z","updated_at":"2025-09-25T10:30:21.902Z","avatar_url":"https://github.com/MiniMarker.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C_Exam 2018\n\n## Description\nThis is a project for decrypting encrypted password by reversing the deprecated MD5-encryption method.\nThis program scans a dictionary file for a correct guess, if the given hash does´n exist in the file the code will start\nto \"bruteforce guess\" every combination up to at given password length.\n\n### Flow of the program\n1. The given hash is validated in some simple checks.\n2. The given hash is splitted into two parts and saved in a struct called SplittedPassword.\n3. Searches all lines in the dictionary file.\n    1. Every line gets encrypted with the salt of the given hash.\n    2. If there is a match the result is displayed to the user and the program is terminated.\n4. Bruteforce beginning to guess password.\n    1. Every guess gets encrypted with the salt of the given hash.\n    2. If there is a match the result is displayed to the user and the program is terminated.\n\n## How to run\n1. Clone this repo\n2. From root folder in the project, run the following commands:\n    - `make`\n    - `./bin/dictionary '\u003chash\u003e'` \n        - Examples:\n        - dictionary guess)     `./bin/main '$1$7tBjugEa$h3cZLWYTXCwqikbFvQe7A/'`\n        - brute force guess)    `./bin/main '$1$JpWPMkg+$WpRBP/wtLDqu83m.wo16D0'`\n\n### Aditional make commands\n- `make clean`\n  - cleans up autogenerated files\n- `make remake`\n  - cleans up autogenerated files and builds the program\n\n## Missing features an known bugs\nWhen I started on this project I implemented the feature that it would be possible to scan through a file of hashes and\nreturn all the decrypted results, the function is still in the code but commented out and made not reachable because\nin \"bruteforce mode\" the program exites completely without closing the file if there is a result.\n\nI made this desition to completely exit by using `exit(0)` the program if the password needed to be bruteforced and \ndisable this function because lack of time and because it wasn´t a formal requirement in the exam to have this feature implemented.\n\nThere is also a small memory leak of 601 __still reachable__ bytes from the main function, i couldn`t figure out why this happend so\nI didn´t correct it. I know this isn´t perfect but still reachable memory leaks is no threat for the OS that cleans up these types of leak.\nIf this had been a small embedded device it had been worse.\n\n## Additional documents\n- [Exam 2018 Task](docs/ExamTask.pdf)\n- [Folder structure](docs/folderStructure.md)\n- [Future ideas and features](docs/futureIdeas.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmarker0%2FC_Exam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmarker0%2FC_Exam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmarker0%2FC_Exam/lists"}