{"id":16421720,"url":"https://github.com/peppelinux/pyssha-slapd","last_synced_at":"2025-10-26T22:30:43.737Z","repository":{"id":143289875,"uuid":"116579584","full_name":"peppelinux/pySSHA-slapd","owner":"peppelinux","description":"Python SSHA hash generator and validator with debugging features","archived":false,"fork":false,"pushed_at":"2020-02-11T15:10:18.000Z","size":39,"stargazers_count":11,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-07T15:35:38.024Z","etag":null,"topics":["openldap","sha1","slapd","ssha","ssha160"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peppelinux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-01-07T16:08:44.000Z","updated_at":"2023-09-28T05:13:37.000Z","dependencies_parsed_at":"2023-05-06T05:12:38.176Z","dependency_job_id":null,"html_url":"https://github.com/peppelinux/pySSHA-slapd","commit_stats":null,"previous_names":["peppelinux/pyssha"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peppelinux%2FpySSHA-slapd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peppelinux%2FpySSHA-slapd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peppelinux%2FpySSHA-slapd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peppelinux%2FpySSHA-slapd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peppelinux","download_url":"https://codeload.github.com/peppelinux/pySSHA-slapd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219862038,"owners_count":16555959,"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":["openldap","sha1","slapd","ssha","ssha160"],"created_at":"2024-10-11T07:34:30.776Z","updated_at":"2025-10-26T22:30:38.475Z","avatar_url":"https://github.com/peppelinux.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pySSHA-slapd\nPython hashlib generator born as a script to test OpenLDAP user passwords.\nIt supports salted:\n\n- md5\n- sha1\n- sha224\n- sha256\n- sha384\n- sha512\n\nIntroduction\n------------\npySSHA-slapd is a simple SSHA string encoder e checker that's quite easy to use:\n````\npython3 ssha.py -p slapdsecret\n{SSHA}omu7YHgg6_uqOIN_epZtfJtGo0ruwdSr \n````\nUsage\n````\nusage: ssha.py [-h] -p P [-s S] [-salt_size SALT_SIZE] [-c C] [-enc ENC] [-b]\n               [-prefixed] [-d D]\n\nUsage: python ssha.py -p Password[-c SSHA hash to check]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -p P                  Password to encode\n  -s S                  Salt, 4 bytes in hex format, example \"fooo\": -s\n                        666f6f6f\n  -salt_size SALT_SIZE  salt lenght\n  -c C                  {SSHA} hash to check\n  -enc ENC              Encoder to use, example: sha1 sha224 sha256 sha384\n                        sha512\n  -b                    if {SSHA} hash is in base64 format\n  -prefixed             if suffixed or prefixed salt\n  -d D                  Debug level from 1 to 5\n\n````\n\nDependencies\n------------\nPython3 and hashlib\n\nUsage examples\n--------------\n\nYou can adopt a specified salt for hashing, in hex format:\n````\npython3 ssha.py -p slapdsecret -s 74be2629\n{SSHA}w5CJCwNQk44NjTYzcMZNKbE6Bu90viYp \n````\n\nVerify if a password is valid comparing it with a SSHA hash:\n````\npython3 ssha.py -c {SHA1}pPUGnEBCmIa+fJy6ZTS87eEg+ylVYDqcrs6oHA== -p slapdsecret \n````\n\nSame as previous but ssha hash is in base64 format (like ldapsearch output):\n````\npython3 ssha.py -c e1NIQTF9dzVDSkN3TlFrNDROalRZemNNWk5LYkU2QnU5MHZpWXA= -b -p slapdsecret -salt_size 4\n````\n\nSame as the previous but with maximum debug level\n````\npython3 ssha.py -c e1NIQTF9dzVDSkN3TlFrNDROalRZemNNWk5LYkU2QnU5MHZpWXA= -b -p slapdsecret -d 3 -salt_size 4\n\n[sshaSplit debug]\n\tssha_password: {SSHA}w5CJCwNQk44NjTYzcMZNKbE6Bu90viYp \n\tsalt: 74be2629 \n\tpayload: 0b0350938e0d8d363370c64d29b13a06ef\n\n[checkPassword debug]\n \tssha_password:    {SSHA}w5CJCwNQk44NjTYzcMZNKbE6Bu90viYp\n\tcreated_password: {SSHA}w5CJCwNQk44NjTYzcMZNKbE6Bu90viYp\n\tsalt: 74be2629\n\tpassword: slapdsecret\n\n{SSHA} Check is valid: True\n````\n\nselect your preferred encoder\n````\npython3 ssha.py -p slapdsecret -s 74be2629 -enc sha512\n{SHA512}4gm2Ep0Nklb8pkss9zIs+t6/BGaGn2QYphl3UeAYuBBNW/hj8glu4jUb7JPb4LVWdCv+g0WoyYUB9VWVajQpjHS+Jik= \n````\n\nwithout salt\n````\npython3 ssha.py -p ciao -d 3 -salt_size 0  -enc sha512\n````\n\nOpenLDAP use a 8byte lenght salt, you can also change this value with **-salt_size** option.\n\nResources\n---------\n- https://tools.ietf.org/html/rfc3174\n- https://github.com/openldap/openldap/blob/master/libraries/liblutil/sha1.c\n- https://github.com/openldap/openldap/blob/master/contrib/slapd-modules/passwd/sha2/README\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeppelinux%2Fpyssha-slapd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeppelinux%2Fpyssha-slapd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeppelinux%2Fpyssha-slapd/lists"}