wjlandryiii / crackvim

crack text files encrypted with vim's :X command
22 stars 4 forks source link

Didn't work #1

Open Frankenshtine opened 8 years ago

Frankenshtine commented 8 years ago

~/crackvim-master$ make gcc -g -c -o crackvim.o crackvim.c gcc -c -o crc32.o crc32.c gcc -c -o pkzip_crypto.o pkzip_crypto.c gcc -g -o crackvim crackvim.o crc32.o pkzip_crypto.o

~/crackvim-master$ ./crackvim test.txt loaded test.txt: 40 bytes searching for ascii text files using brute force max password length: 6 charset: 0

wjlandryiii commented 8 years ago

Did you wait long enough? I suspect there a ^C that you didn't copy from your console. Try again, but this time, grab a juice box and wait. This is brute force, not magic.

Frankenshtine commented 8 years ago

Saying "not working" I mean - not working! :)

$ time ./crackvim test.txt loaded test.txt: 40 bytes searching for ascii text files using brute force max password length: 6 charset: 0

real 0m0.001s user 0m0.000s sys 0m0.000s

$ strace ./crackvim test.txt execve("./crackvim", ["./crackvim", "test.txt"], [/* 74 vars */]) = 0 brk(NULL) = 0x1b3c000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc5ceeb6000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=178528, ...}) = 0 mmap(NULL, 178528, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc5cee8a000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0 mmap(NULL, 3967488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc5ce8ca000 mprotect(0x7fc5cea8a000, 2093056, PROT_NONE) = 0 mmap(0x7fc5cec89000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7fc5cec89000 mmap(0x7fc5cec8f000, 14848, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc5cec8f000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc5cee89000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc5cee88000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc5cee87000 arch_prctl(ARCH_SET_FS, 0x7fc5cee88700) = 0 mprotect(0x7fc5cec89000, 16384, PROT_READ) = 0 mprotect(0x602000, 4096, PROT_READ) = 0 mprotect(0x7fc5ceeb8000, 4096, PROT_READ) = 0 munmap(0x7fc5cee8a000, 178528) = 0 brk(NULL) = 0x1b3c000 brk(0x1b5d000) = 0x1b5d000 open("test.txt", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0664, st_size=40, ...}) = 0 fstat(3, {st_mode=S_IFREG|0664, st_size=40, ...}) = 0 lseek(3, 0, SEEK_SET) = 0 read(3, "VimCrypt~01!\0232\241\370\207\375\304\7\307c\277\246\34\200\277\21\240\367x\202"..., 40) = 40 lseek(3, 40, SEEK_SET) = 40 close(3) = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 13), ...}) = 0 write(1, "loaded test.txt: 40 bytes\n", 26loaded test.txt: 40 bytes ) = 26 write(1, "searching for ascii text files\n", 31searching for ascii text files ) = 31 write(1, "using brute force\n", 18using brute force ) = 18 write(1, "max password length: 6\n", 23max password length: 6 ) = 23 write(1, "charset: 0\n", 11charset: 0 ) = 11 write(1, "\n", 1 ) = 1 exit_group(0) = ? +++ exited with 0 +++

tfurrows commented 7 years ago

Chudnovskiy, you need to add "-m32" to the gcc lines in your Makefile. At this point you'll need to "make clean" to clear things out, make the change, and re-compile. I had the same issue you did when I tried to compile on a 64-bit system, but the program had worked for me on a 32-bit system previously. Adding the "-m32" lines worked for me.

cacoch commented 7 years ago

yep, same problem as Chudnovskiy. And solution adding flag works at least for info. Waiting for decrypt my own file.