Skip to content

Commit

Permalink
minor link updates
Browse files Browse the repository at this point in the history
  • Loading branch information
krrish-sehgal committed Nov 5, 2024
1 parent a701e33 commit 9167b21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
2 changes: 1 addition & 1 deletion website/templates/malicious_ips_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ <h1>Reported Malicious IPs</h1>
</div>
</div>
<div class="bottom-right">
<a href="https://github.com/OWASP-BLT/BLT/blob/main/website/templates/new_home.html">
<a href="https://github.com/OWASP-BLT/BLT/blob/main/website/templates/malicious_ips_list.html">
<i class="fab fa-github"></i>
</a>
<a href="https://www.figma.com/file/JE0QlQ95FVpk0wG9HyFw4D/BLT-Website?type=design&node-id=0%3A1&mode=design&t=glf1ydd0YzYzsUJh-1">
Expand Down
31 changes: 0 additions & 31 deletions website/templates/report_ip.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@
</select>
</div>
</div>
<!-- Check for Duplicates Button -->
<!-- <div class="mt-8 flex justify-end">
<button type="button" class="w-full h-[50px] rounded-md hover:text-white cursor-pointer bg-red-500 hover:bg-red-700 items-center justify-center flex text-2xl font-semibold text-white outline-none" id="check-duplicates">
Check for Duplicates
</button>
</div> -->
</div>
<!-- Malicious Activity Description Input -->
<div class="mt-12 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6">
Expand Down Expand Up @@ -168,36 +162,11 @@
const validationResult = document.getElementById('ip_address');

if (validateIP(ipInput)) {

// validationResult.style.borderColor = 'green';
return true;
} else {
alert("invalid ip")
validationResult.style.borderColor = 'red';
return false;
}
}

document.getElementById("check-duplicates").addEventListener("click", async function() {
const uri = document.getElementById("ip_address").value;

const response = await fetch("/api/v1/urlcheck/", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ "domain_url": uri })
});

const data = await response.json();
const duplicateList = document.getElementById("duplicate-list");
duplicateList.innerHTML = ""; // Clear list

data.forEach(issue => {
duplicateList.innerHTML += `<li>${issue.description}</li>`;
});

document.getElementById("duplicate-container").style.display = "block";
});
</script>
{% endblock after_js %}

0 comments on commit 9167b21

Please sign in to comment.