Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
rgl committed Jan 8, 2019
0 parents commit 19a673b
Show file tree
Hide file tree
Showing 7 changed files with 589 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.exe
*.zip
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
all: vncpassword.zip

vncpassword.exe: main.c d3des.h d3des.c
gcc -Os -o $@ -m64 main.c
strip $@

vncpassword.zip: vncpassword.exe
zip -9 $@ $<
sha256sum $@

clean:
rm -f vncpassword.exe vncpassword.zip

.PHONY: all clean
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# About

Encrypts (DES) a password like [TigerVNC](https://tigervnc.org/).

# Usage

Install MSYS2, then build as:

```bash
pacman --noconfirm -Sy mingw-w64-x86_64-gcc make
make
```

Then use it like:

```bash
./vncpassword.exe $(python3 -c 'print(b"vagrant\0".hex())') # 3c89f4466dc2a67a
```

## Source Code

Most of the included source code came from:

* https://github.com/TigerVNC/tigervnc/blob/8c6c584377feba0e3b99eecb3ef33b28cee318cb/common/rfb/d3des.h
* https://github.com/TigerVNC/tigervnc/blob/8c6c584377feba0e3b99eecb3ef33b28cee318cb/common/rfb/d3des.c
* https://github.com/TigerVNC/tigervnc/blob/8c6c584377feba0e3b99eecb3ef33b28cee318cb/common/rfb/Password.h
* https://github.com/TigerVNC/tigervnc/blob/8c6c584377feba0e3b99eecb3ef33b28cee318cb/common/rfb/Password.cxx
Loading

0 comments on commit 19a673b

Please sign in to comment.