-
Notifications
You must be signed in to change notification settings - Fork 1
/
ssrf.h
34 lines (27 loc) · 1.03 KB
/
ssrf.h
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
#include "headers.h"
#include "xss_detector.h"
bool check_ssrf_payload(string data_payload, string payload) {
size_t found = data_payload.find(payload);
if (found != string::npos) {
return true;
}
return false;
}
void SSRF_Detector(char *data_payload, char *source_ip , char* destination_ip){
string file_name = "ssrf_payload.txt";
ifstream infile(file_name);
string payload;
if (!infile) {
cout << "Error opening file: " << file_name << endl;
}
while (getline(infile, payload)) {
if (check_ssrf_payload(data_payload, payload)) {
cout<<"\n SSRF Payload Detected ....";
cout << "\nPayload >>" << payload << " << found in data payload." << endl;
string str = " SSRF Payload Detected .... Payload is >> " + payload + " << found in data payload Source IP attacking is >> " + source_ip + " << and Destination IP is >> " + destination_ip + " << ";
Output1(str);
// exit(0);
}
}
infile.close();
}