Érico Rolim
06eb9d4222
Split mmap_file implementation.
...
Also add some useful definitions.
2020-09-14 00:32:16 -03:00
Érico Rolim
52f7829b48
Fix some compiler warnings.
2020-09-14 00:09:09 -03:00
Érico Rolim
a80f082b48
Remove padding bytes (uglily) from encrypted recv.
2020-09-13 20:32:37 -03:00
Érico Rolim
f13c0c2e3e
Add decryption for recv.
...
A few fixes and hacks all around, but can now do:
./purr -e recv (./purr -e send makefile)
And output the original page.
2020-09-13 20:17:58 -03:00
Érico Rolim
b70d741b03
Enable IV randomization.
2020-09-13 18:08:52 -03:00
Érico Rolim
94f8f4f61d
Enable encrypted pastes properly.
...
Add base64 encoding per the pattern expected by the web interface.
Fix some pointers and file size things in purr/files.
TODO: files are cut off at random points, despite the efforts to remove
verification of null characters in libbaseencode.
2020-09-13 18:05:43 -03:00
Érico Rolim
baa013afae
Move to mmap implementation.
...
Using FILE* is error prone and limited.
2020-09-13 13:32:28 -03:00
Érico Rolim
32f9910ece
Fix encryption function.
...
Fix pointer parameters as function returns.
Add file clean-up as an atexit functionality.
2020-09-13 01:06:39 -03:00
Érico Rolim
dd30aa72a8
Split encrypt.c and fix use-after-free.
...
UAF from genalloc and stralloc frees.
Also remove randomization of IV, not used in bsd.ac.
2020-09-12 23:28:49 -03:00