Commit Graph
8 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