-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (26 loc) · 683 Bytes
/
main.cpp
File metadata and controls
29 lines (26 loc) · 683 Bytes
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
#include <iostream>
#include <cstdlib>
#include <signal.h>
#include "Fuzzers/SSHHandshakeStepNValidateFuzzer.h"
using namespace std;
int main(int argc, char *argv[]) {
signal(SIGPIPE, SIG_IGN);
if (argc < 4) {
cout<<"USAGE:"<<argv[0]<<" <server IP> <service port> <N>"<<endl;
return 1;
}
SSHHandshakeStepNValidateFuzzer *fuzzer = new SSHHandshakeStepNValidateFuzzer();
fuzzer->setSSHServerIPAddr(argv[1]);
fuzzer->setSSHServerPort(atoi(argv[2]));
fuzzer->setN(atoi(argv[3]));
while (true) {
try {
fuzzer->fuzz();
}
catch (...) {
continue;
}
}
delete fuzzer;
return 0;
}