First Commit
parent
fe577ac8df
commit
4e7bcfc0e8
|
@ -0,0 +1,26 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "AdotpAPet API Key",
|
||||||
|
"url": "https://github.com/daffainfo/all-about-apikey/blob/main/Animals/AdoptAPet.md",
|
||||||
|
"description": "Resource to help get pets adopted",
|
||||||
|
"regex": "^([a-z0-9]{33})$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Petfinder API Key",
|
||||||
|
"url": "https://github.com/daffainfo/all-about-apikey/blob/main/Animals/Petfinder.md",
|
||||||
|
"description": "Petfinder is dedicated to helping pets find homes, another resource to get pets adopted",
|
||||||
|
"regex": "^([a-zA-Z0-9]{50})$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Clearbit API Key",
|
||||||
|
"url": "https://github.com/daffainfo/all-about-apikey/blob/main/Business/Clearbit.md",
|
||||||
|
"description": "Search for company logos and embed them in your projects",
|
||||||
|
"regex": "^(sk_[a-z0-9]{32})$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ImprovMX API Key",
|
||||||
|
"url": "https://github.com/daffainfo/all-about-apikey/blob/main/Business/ImprovMX.md",
|
||||||
|
"description": "API for free email forwarding service",
|
||||||
|
"regex": "^(sk_[a-z0-9]{32})$"
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,33 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>API Guesser</title>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
|
||||||
|
<script src="https://markdown-it.github.io/markdown-it.js"></script>
|
||||||
|
<script src="script.js"></script>
|
||||||
|
<style>
|
||||||
|
.link-class:hover {
|
||||||
|
background-color: #d1d1d1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h2 class="text-center mt-5">API Guesser</h2>
|
||||||
|
<h6 class="text-center mt-2 mb-5">Made by Muhammad Daffa</h6>
|
||||||
|
<input type="text" name="search" id="search" placeholder="Input your API Key / Token" class="form-control"/>
|
||||||
|
<p class="mt-3" id="count"></p>
|
||||||
|
<!-- <div id="content"></div>
|
||||||
|
<script>
|
||||||
|
document.getElementById('content').innerHTML =
|
||||||
|
marked.parse('#### Marked in the browser\n\nRendered by **marked**.');
|
||||||
|
</script> -->
|
||||||
|
<div class="row" id="result"></div>
|
||||||
|
<div id="output"></div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,35 @@
|
||||||
|
$(document).ready(function () {
|
||||||
|
$.ajaxSetup({ cache: false });
|
||||||
|
$("#search").keyup(function () {
|
||||||
|
if (!$(this).val().length) {
|
||||||
|
$("#result").html("");
|
||||||
|
$("#count").html("");
|
||||||
|
} else {
|
||||||
|
let count = 0;
|
||||||
|
$("#result").html("");
|
||||||
|
$("#state").val("");
|
||||||
|
let searchField = $("#search").val();
|
||||||
|
$.getJSON("data.json", function (data) {
|
||||||
|
$.each(data, function (key, value) {
|
||||||
|
// console.log(array_count.length)
|
||||||
|
let regex_result = new RegExp(value.regex, "g");
|
||||||
|
if (searchField.match(regex_result)) {
|
||||||
|
count++;
|
||||||
|
$("#result").append(`
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="card mt-4">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">` + value.name + `</h5>
|
||||||
|
<p class="card-text">` + value.description + `</p>
|
||||||
|
<a href="` + value.url + `" class="btn btn-primary" target="_blank" >More Information</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$("#count").text(count + " results of " + searchField);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue