-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
60 lines (47 loc) · 1.39 KB
/
main.cpp
File metadata and controls
60 lines (47 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
===========================================================================
SSHConnector
Copyright (C) 2024 spalter
This file is part of sshconnector, distributed under the GNU GPL v2
For full terms see the included COPYING file.
===========================================================================
*/
#include "main.h"
#include <stdio.h>
using namespace std;
/***********************************************************************
main
***********************************************************************/
/*
=====================
main
=====================
*/
int main( int argc, char **argv )
{
auto app = SSHConnector();
if ( argc > 1 )
{
app.SetHostFile( argv[1] );
if ( argc > 2 )
{
app.SetUserHostFile( argv[2] );
}
if ( argc > 3 )
{
app.SetHelpFile( argv[3] );
}
app.Run();
}
else
{
cout << "Missing configuration files" << endl;
cout << "Usage: sshconnector hosts.conf userhosts.conf [helpfile.txt]" << endl;
cout << endl;
cout << APP_TITLE << ", Copyright (C) 2024 Spalt3r Development" << endl;
cout << "sshconnector comes with ABSOLUTELY NO WARRANTY;" << endl;
cout << "This is free software, and you are welcome" << endl;
cout << "to redistribute it under certain conditions;" << endl;
return 1;
}
}