From 63ba0bf0fe8424af9a24c9a15cff87e14725aae5 Mon Sep 17 00:00:00 2001 From: Renge Date: Sun, 21 Apr 2024 23:10:08 -0400 Subject: [PATCH] feat: add README --- Project/README.md | 48 +++++++++++++++++++++++++++++++++++++++ Project/public/index.html | 8 +++++++ 2 files changed, 56 insertions(+) create mode 100644 Project/README.md diff --git a/Project/README.md b/Project/README.md new file mode 100644 index 0000000..548c335 --- /dev/null +++ b/Project/README.md @@ -0,0 +1,48 @@ +# MailChecker + +## Requirement +- swipl: SWI-Prolog version 9.2.3 for x86_64-linux +- npm: 10.5.2 +- nodejs: v18.18.2 + +## How to run it +``` shell +npm install +npm start +``` +then visit localhost:3000 + +## Example input +``` +google.com +renge.io +gmail.com +outlook.com +cs.stonybrook.edu +``` + +## Expected result +``` +a: +[ + "1.1.1.1" //list of IPs the input domain pointed to +] +mx: +[ + //list of mx domain and priority that the domain points to + { + "exchange": "example.com", + "priority": 10 + } +] +spf: +{ + "spf": "v=spf1 mx -all", //spf record of the domain + "allowedIP4": [ + "1.1.1.1" //lists of ipv4 ips that is allowed to send email from this domain + ], + "allowedIP6": [ + "2001:4860:4000::/36" //lists of ipv6 ips that is allowed to send email from this domain + ] +} +``` diff --git a/Project/public/index.html b/Project/public/index.html index a3c8f2c..4d3bc55 100644 --- a/Project/public/index.html +++ b/Project/public/index.html @@ -37,6 +37,14 @@ console.error('ERROR:', error); } } + + // Add event listener for Enter key press + document.getElementById("inputText").addEventListener("keyup", function(event) { + if (event.key === "Enter") { + event.preventDefault(); + sendGetRequest(); + } + });