Cleanup 3proxy_crypt

This commit is contained in:
Vladimir Dubrovin 2026-04-18 15:47:07 +03:00
parent 260cbf7a3d
commit 45796f66c7
4 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@ -258,3 +258,4 @@ pip-log.txt
#Mr Developer
.mr.developer.cfg
CLAUDE.md
bin/3proxy_crypt

View File

@ -287,7 +287,7 @@ TLS proxy (SNI proxy) - sniffs hostname from TLS handshake
UDP port mapping. Maps some UDP port on local machine to UDP port on remote machine. Only one user simultaneously can use UDP mapping, so it can't be used for public service in large networks. It's OK to use it to map to DNS server in small network or to map Counter-Strike server for single client (you can use few mappings on different ports for different clients in last case).
### 3proxy_crypt
Program to obtain crypted password for cleartext. Supports both MD5/crypt and NT password.
Program to obtain crypted password for cleartext. Supports both salted and NT password.
```bash
3proxy_crypt password # produces NT password

Binary file not shown.

View File

@ -71,12 +71,13 @@ unsigned char * mycrypt(const unsigned char *pw, const unsigned char *salt, unsi
unsigned char *p;
const unsigned char *sp;
unsigned char final[MD5_SIZE];
int sl,pl,i;
int sl;
unsigned long l;
#ifndef WITHMAIN
if(salt[0] == '$' && salt[1] == '1' && salt[2] == '$' && (ep = (unsigned char *)strchr((char *)salt+3, '$'))) {
MD5_CTX ctx,ctx1;
int pl, i;
sp = salt +3;
sl = (int)(ep - sp);