~ubuntu-branches/ubuntu/precise/4g8/precise

« back to all changes in this revision

Viewing changes to src/usage.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2007-03-26 16:19:06 UTC
  • Revision ID: james.westby@ubuntu.com-20070326161906-00xhpx7yaef36u63
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * author: Darren Bounds <dbounds@intrusense.com>
 
3
 * copyright: Copyright (C) 2002 by Darren Bounds
 
4
 * license: This software is under GPL version 2 of license
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
 *
 
20
 * 4g8 official page at http://.net
 
21
 */
 
22
 
 
23
#include "usage.h"
 
24
 
 
25
void
 
26
print_usage()
 
27
{
 
28
    fprintf(stdout, "Usage: 4g8 -i <device> -g <gw_ip> -G <gw_mac> -s <host_ip> -S <host_mac> [-w file] [-Xh]\n\n");
 
29
 
 
30
    fprintf(stdout, "Required:\n");
 
31
    fprintf(stdout, "  -g gw_ip    IP address of gateway to impersonate\n");
 
32
    fprintf(stdout, "  -G gw_mac   MAC address of gateway to impersonate\n");
 
33
    fprintf(stdout, "  -s host_ip  IP address of victim host\n");
 
34
    fprintf(stdout, "  -S host_mac MAC address of victim host\n");
 
35
    fprintf(stdout, "\n");
 
36
 
 
37
    fprintf(stdout, "Options:\n");    
 
38
    fprintf(stdout, "  -h          Display this message\n");
 
39
    fprintf(stdout, "  -i device   Device to listen on\n");
 
40
    fprintf(stdout, "  -w file     Write captured data to file\n");
 
41
    fprintf(stdout, "  -X          Dump the packet in hex and ascii\n");
 
42
    fprintf(stdout, "\n");
 
43
    
 
44
    fprintf(stdout, "Version: %s\n", FG_VERSION); 
 
45
    fprintf(stdout, "Author:  %s\n", FG_AUTHOR);
 
46
    fprintf(stdout, "Website: %s\n", FG_SITE);
 
47
    fprintf(stdout, "\n");
 
48
   
 
49
    exit(SUCCESS);
 
50
}
 
51
 
 
52
void
 
53
print_version()
 
54
{
 
55
    fprintf(stdout, "Version: %s\n", FG_VERSION);
 
56
    fprintf(stdout, "Author:  %s\n", FG_AUTHOR);
 
57
    fprintf(stdout, "Website: %s\n", FG_SITE);
 
58
    fprintf(stdout, "\n");
 
59
 
 
60
    exit(SUCCESS);
 
61
}
 
62