remailer.c (843B)
1 /* Mixmaster version 3.0 -- (C) 1999 - 2006 Anonymizer Inc. and others. 2 3 Mixmaster may be redistributed and modified under certain conditions. 4 This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 5 ANY KIND, either express or implied. See the file COPYRIGHT for 6 details. 7 8 Simple remailer frontend: Read mix packets from standard input. 9 $Id: remailer.c 934 2006-06-24 13:40:39Z rabbi $ */ 10 11 12 #include "mix.h" 13 #include <stdio.h> 14 15 /** main *****************************************************************/ 16 17 /* Returns: 18 0 successful operation 19 1 error */ 20 21 int main(int argc, char *argv[]) 22 { 23 BUFFER *msg; 24 int ret; 25 26 mix_init(NULL); 27 msg = buf_new(); 28 ret = buf_read(msg, stdin); 29 if (ret != -1) 30 ret = mix_decrypt(msg); 31 32 mix_regular(0); 33 mix_exit(); 34 buf_free(msg); 35 return (ret == 0 ? 0 : 1); 36 }