mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2025-09-08 15:22:57 +00:00
Add vanila proxychains 3.1 sources.
This commit is contained in:
48
proxychains/main.c
Normal file
48
proxychains/main.c
Normal file
@ -0,0 +1,48 @@
|
||||
/***************************************************************************
|
||||
main.c - description
|
||||
-------------------
|
||||
begin : Tue May 14 2002
|
||||
copyright : netcreature (C) 2002
|
||||
email : netcreature@users.sourceforge.net
|
||||
***************************************************************************/
|
||||
/* GPL */
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* well ... actually this file could be a shell script ... but C rulez :).
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if(argc<2)
|
||||
{
|
||||
printf("\nUsage: proxychains program_name [arguments]\n"
|
||||
"\t for example : proxychains telnet somehost.com\n"
|
||||
"More help in README file\n");
|
||||
return 0 ;
|
||||
}
|
||||
putenv("LD_PRELOAD=/usr/lib/libproxychains.so");
|
||||
execvp(argv[1],&argv[1]);
|
||||
perror("proxychains can't load process....");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Reference in New Issue
Block a user