Commit Graph

38 Commits

Author SHA1 Message Date
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
Jason K 901fdb403c
Update README.md 2021-12-07 23:00:47 +08:00
Jason K f556d0e5dd
Merge pull request #25 from clementnuss/optional-slack
fix: make slack integration optional when uri not specified
2021-11-06 17:59:28 +08:00
Clément Nussbaumer d13ba926f3 fix: make slack integration optional when uri not specified 2021-11-06 10:41:41 +01:00
Jason K fba6204554
Merge pull request #24 from northportio/main
Added Slack Integration
2021-11-05 21:27:03 +08:00
Northport IO 6ae5bd5c44
Added Slack Integration 2021-10-25 16:43:20 -04:00
Jason K d151789229
Merge pull request #20 from Sailboat265/main
Fix duplicate record and record being mysteriously deleted
2021-10-23 15:35:39 +08:00
Sailboat265 7f1e80e000 Update cloudflare-template.sh 2021-10-21 01:38:10 +08:00
Jason K ca4d5fd535
Update cloudflare-template.sh 2021-08-21 14:42:18 +08:00
Jason K d8ceb1ba4b
Merge pull request #8 from clementnuss/main
replace PCRE regexp with standard regexp
2021-08-19 13:18:52 +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
Jason K ee49627f08
Merge pull request #6 from ndrone/stderr
Updates error logging to stderr
2021-07-21 22:25:58 +08:00
Nicholas Drone 6f67197f4f Updates error logging to stderr 2021-07-21 09:51:41 -04:00
Jason K 18164abc73
Merge pull request #4 from ndrone/updateLogs
Updates Logging
2021-07-20 04:39:38 +08: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
Jason K a88aa3a52a
Merge pull request #3 from SlimJim716/main
Fix Merge Issue
2021-07-20 02:58:23 +08:00
JP 220ccd1820
Fix Merge Issue 2021-07-19 14:52:27 -04:00
Jason K c191ccf717
Merge pull request #2 from SlimJim716/main
Ability to use Scoped API Token rather than Global API Key
2021-07-19 20:58:03 +08:00
Jason K cf243aa00b
Merge branch 'main' into main 2021-07-19 20:57:52 +08:00
JP 3c2d8933cf
Fixed Typo 2021-07-19 08:18:24 -04:00
Jason K f639d9bcb2
Update README.md 2021-07-19 19:55:48 +08:00
Jason K f48fe12fb9
Update README.md 2021-07-19 19:45:43 +08:00
Jason K 231dd2cb0b
Merge pull request #1 from bioinformike/main
Adding date time function for logs
2021-07-19 19:37:12 +08:00
Mike Lape 5debdd0e56
Changed whitespace in function definition 2021-07-19 07:13:53 -04:00
JP 6e15f4f85f
Update cloudflare-template.sh 2021-07-19 00:59:22 -04:00
JP 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 Lape 3a8a6dc7e9
Adding date time function for logs 2021-07-18 20:49:53 -04:00
Jason Koh 77d964f11a
Update README.md 2020-11-10 13:07:09 +08:00
Jason Koh 531637c0ac
Add files via upload 2020-11-09 20:54:09 +08:00
Jason Koh 20e461cffe
Update README.md 2020-11-09 20:53:17 +08:00
Jason Koh e2d96fb837
Initial commit 2020-11-09 20:49:48 +08:00