24 Commits
Author SHA1 Message Date
AgingOrange 6af3585c79 Add Discord notification. Rename slacksitename to sitename as they will probably be the same. 2022-03-31 07:15:08 +02:00
9cco 00db8af28f Stricter regex, should now catch all false positives 2022-03-12 12:45:16 +01:00
9cco 08ef1d559d Add cloudflare ip lookup. Remove unnecessary feats
Added https:/cloudflare.com/cd-cgi/trace as default ip lookup method.
Removed possibility of MiTM attack through dig. Cleaned script of
unnecessary check for command existance.
2022-02-27 13:44:48 +01:00
9cco 46ea8de30c Added cloudflare.com as a way of finding the ip 2022-02-26 12:09:26 +01:00
9cco 6a50f940cb Incorporating feedback
Changed the way we generate the api data back to the original. Clarified
comments. Added more logic to how we obtain the public IPv4 address,
such that input is sanitized.

If curl is not found, then the rest of the script can't run so we exit
with an error code. We try to use DNS if HTTPS fails to obtain
a valid IP. Added log messages for these events.
2022-02-26 11:10:26 +01:00
9cco ebcc60faa3 Improved regex as pr timetoexpire comment 2022-02-26 02:46:48 +01:00
9cco 9d2e7fcc8a Taking feedback from timetoexpire
Changed back so that curl is used by default, however dig can be used
as a backup if curl is not installed on the system. Additionally took
my fear of code injection into account by sanitizing the remote input
through a regex.
2022-02-25 12:24:17 +01:00
9cco ff6a8df63c Fixed problem with dig not always giving correct output 2022-02-19 12:35:53 +01:00
9cco e8873cc328 Added dig as possible ip resolver
Used shell built-in command -v to determine if dig is installed and if
it is, use it as default for getting the ip-address. Also made the use
of brackets consistent and updated the the way the data variable is
created before it is sent with curl to make it more readable in the
code.
2022-02-13 17:11:22 +01:00
Clément Nussbaumer d13ba926f3 fix: make slack integration optional when uri not specified 2021-11-06 10:41:41 +01:00
Northport IOandGitHub 6ae5bd5c44 Added Slack Integration 2021-10-25 16:43:20 -04:00
Sailboat265 7f1e80e000 Update cloudflare-template.sh 2021-10-21 01:38:10 +08:00
Jason KandGitHub ca4d5fd535 Update cloudflare-template.sh 2021-08-21 14:42:18 +08:00
Clément Nussbaumer ea68158b97 replace PCRE regexp with standard regexp
Permits to run the script on simpler/lighter Linux distributions,
e.g. OpenWRT, where the grep utility available does not permit to use
Perl extended regexp (the `grep -P` option)
2021-08-12 14:26:15 +02:00
Nicholas Drone 6f67197f4f Updates error logging to stderr 2021-07-21 09:51:41 -04:00
Nicholas Drone 662985dc3b Updates Logging
Instead of creating a log file. This change leverages the syslog. This allows us to not have to manually rotate logs, or worry about the log file filling up the file system. This also give us timestamps of the logging without having to create the timestamps ourselves. Messages are logged to /var/log/messages by default.
2021-07-19 16:26:13 -04:00
JPandGitHub 220ccd1820 Fix Merge Issue 2021-07-19 14:52:27 -04:00
Jason KandGitHub cf243aa00b Merge branch 'main' into main 2021-07-19 20:57:52 +08:00
JPandGitHub 3c2d8933cf Fixed Typo 2021-07-19 08:18:24 -04:00
Mike LapeandGitHub 5debdd0e56 Changed whitespace in function definition 2021-07-19 07:13:53 -04:00
JPandGitHub 6e15f4f85f Update cloudflare-template.sh 2021-07-19 00:59:22 -04:00
JPandGitHub 7b24096857 Added token option
Added ability to use either Cloudflare Global API Key or Scoped API Key
2021-07-19 00:58:07 -04:00
Mike LapeandGitHub 3a8a6dc7e9 Adding date time function for logs 2021-07-18 20:49:53 -04:00
Jason KohandGitHub 531637c0ac Add files via upload 2020-11-09 20:54:09 +08:00