From 034983595149244e76a9c09b61d78e9901a56d24 Mon Sep 17 00:00:00 2001 From: ekultek Date: Thu, 7 Dec 2017 07:25:48 -0600 Subject: [PATCH] created a new plugin identifier for moodle --- lib/plugins/moodle.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/plugins/moodle.py diff --git a/lib/plugins/moodle.py b/lib/plugins/moodle.py new file mode 100644 index 0000000..8e3779b --- /dev/null +++ b/lib/plugins/moodle.py @@ -0,0 +1,19 @@ +import re + + +__product__ = "Moodle" +__description__ = ( + "Moodle is an opensource educational software written in PHP" +) + + +def search(html, **kwargs): + html = str(html) + plugin_detection_schema = ( + re.compile(r".moodle.", re.I), + re.compile(r".moodlesession.", re.I), + re.compile(r".php.moodlesession.(\w+)?(\d+)?", re.I) + ) + for plugin in plugin_detection_schema: + if plugin.search(html) is not None: + return True