Skip to content

Commit

Permalink
Fixing a variable and POSTing remoteip in json for compatibility with…
Browse files Browse the repository at this point in the history
… more webhooks
  • Loading branch information
mudmin committed Feb 2, 2021
1 parent 8a38463 commit 31e9864
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ESPCanary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ void FtpServer::handleFTP()
//if you have your own canary-type service and want to post paramaters,
//do it in JSON here
//feel free to use the ArduinoJSON libarary for more complicated JSON
// String message = "{\"ip\":\"";
// message = message + remoteip;
// message = message + "\"}";
// http.addHeader("Content-Type", "text/plain");
// Serial.println("POSTing JSON");
// Serial.println(message);
String message = "{\"ip\":\"";
message = message + remoteip;
message = message + "\"}";
http.addHeader("Content-Type", "text/plain");
Serial.println("POSTing JSON");
Serial.println(message);

int httpCode = http.POST(message);
http.end();
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESPCanary
version=2.0.0
version=2.0.1
author=Dan Hoover <[email protected]>
maintainer=Dan Hoover <[email protected]>
sentence=Create an ESP32 or ESP8266 OpenCanary Honeypot
Expand Down

0 comments on commit 31e9864

Please sign in to comment.