Skip to content

Commit

Permalink
add article.html & article.js
Browse files Browse the repository at this point in the history
  • Loading branch information
devsdenepal committed Nov 20, 2023
1 parent 648c02f commit d1461ea
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"liveServer.settings.port": 5501
"liveServer.settings.port": 5502
}
43 changes: 43 additions & 0 deletions article.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Krimson Squad | Article</title>
<link rel="shortcut icon" href="./favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.0.2/tailwind.min.css">
</head>

<body>
<header class="text-gray-400 bg-gray-900 body-font">
<div class="container mx-auto flex flex-wrap p-5 flex-col md:flex-row items-center">
<a class="flex title-font font-medium items-center text-white mb-4 md:mb-0">
<img src="https://avatars.githubusercontent.com/u/134789824?s=48&v=4" style="border-radius: 50%;">
<span class="ml-3 text-xl">Krimson Squad</span>
</a>
<nav class="md:ml-auto flex flex-wrap items-center text-base justify-center">
<a class="mr-5 hover:text-white" href="https://github.com/Krimson-Squad" target="_blank">Github</a>
<a class="mr-5 hover:text-white" href="https://github.com/devsdenepal" target="_blank">Author?</a>
<!-- <a class="mr-5 hover:text-white">Third Link</a>
<a class="mr-5 hover:text-white">Fourth Link</a> -->
</nav>
</div>
</header>
<!-- content -->
<section class="text-gray-400 bg-gray-900 body-font">
<div class="container mx-auto flex px-5 py-24 items-center justify-center flex-col">
<img class="lg:w-2/6 md:w-3/6 w-5/6 mb-10 object-cover object-center rounded" alt="hero" id="img" src="https://dummyimage.com/720x600">
<div class="text-center lg:w-2/3 w-full">
<h1 class="title-font sm:text-4xl text-3xl mb-4 font-medium text-white" id="title">Loading...</h1>
<p class="leading-relaxed mb-8" id="content">Loading...</p>
<!-- <div class="flex justify-center">
<button class="inline-flex text-white bg-indigo-500 border-0 py-2 px-6 focus:outline-none hover:bg-indigo-600 rounded text-lg">Button</button>
<button class="ml-4 inline-flex text-gray-400 bg-gray-800 border-0 py-2 px-6 focus:outline-none hover:bg-gray-700 hover:text-white rounded text-lg">Button</button>
</div> -->
</div>
</div>
</section>
<script src="assets/js/article.js"></script>
</body>
</html>
37 changes: 37 additions & 0 deletions assets/js/article.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const urlParams = new URLSearchParams(window.location.search);
const sub_url = urlParams.get('view');
const final_url = '/article.html?view='+sub_url;
function bring_post(post_url) {
var xhr = new XMLHttpRequest();
var url = "./data/json/post.json"; // Replace with your API endpoint
xhr.open("GET", url, true);
xhr.responseType = "json";
xhr.onload = function () {
if (xhr.status === 200) {
var response = xhr.response;
const result = response.result;
var pages = result
// Loop through the pages and display the information in the div
pages.forEach(function (page) {
if (page.url == post_url) {
document.getElementById('title').innerText = page.title;
if(page.image_url == "N/A"){
document.getElementById("img").src = "./favicon.ico"
}
if(page.content == "loading..."){
document.getElementById('content').innerText = page.description;
}
else{
document.getElementById('content').innerText = page.content;
}
console.table(page);
}
else{
console.log(sub_url,post_url)
}
})
}
}
xhr.send()
}
bring_post(final_url)
6 changes: 6 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
const init_title = document.title;
function change_title(text){
document.title = text
}
function bring_posts() {
var xhr = new XMLHttpRequest();
var url = "./data/json/post.json"; // Replace with your API endpoint
Expand Down Expand Up @@ -46,3 +50,5 @@ function bring_posts() {
xhr.send();
}

setTimeout(change_title,1000,"loading...");
setTimeout(change_title,3000,init_title)
16 changes: 8 additions & 8 deletions data/json/post.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"result": [
{
"title": "Andro-Predom",
"url": "/article?view=andro-predom-2080",
"url": "/article.html?view=andro-predom-2080",
"description": "A Pentesting tool aimed to expose the possible risks of exploiting an android phone through adb commands simulated through the programme which comprises a range of exploiting and exposing features. ",
"content": "loading...",
"featured": "true",
Expand All @@ -12,7 +12,7 @@
},
{
"title": "AndherNagri",
"url": "/article?view=andhernagri-2080",
"url": "/article.html?view=andhernagri-2080",
"description": "A vulnerable site to practice XSS and SQL injection.",
"content": "loading...",
"featured": "false",
Expand All @@ -22,7 +22,7 @@
},
{
"title": "xupa-rustam",
"url": "/article?view=xupa-rustam-2080",
"url": "/article.html?view=xupa-rustam-2080",
"description": "Python based Pentesting Brute-Force tool to crack username and password of a simple traditional website ",
"content": "loading...",
"featured": "false",
Expand All @@ -32,7 +32,7 @@
},
{
"title": "PhantomBlitz",
"url": "/article?view=phantomblitz-2080",
"url": "/article.html?view=phantomblitz-2080",
"description": "PhantomBlitz: Yet another tool for reverse shell execution & payload generator by Dev. Gautam Kumar ",
"content": "loading...",
"featured": "false",
Expand All @@ -42,7 +42,7 @@
},
{
"title": "unvetion",
"url": "/article?view=unvetion-2080",
"url": "/article.html?view=unvetion-2080",
"description": "MINI RECON PROJECT.",
"content": "loading...",
"featured": "false",
Expand All @@ -52,7 +52,7 @@
},
{
"title": "Common Techniques & Software ",
"url": "/article?view=common-techniques-n-software-2080",
"url": "/article.html?view=common-techniques-n-software-2080",
"description": "List of common T1 and SO(s) used by Threat groups.",
"content": "loading...",
"featured": "false",
Expand All @@ -62,7 +62,7 @@
},
{
"title": "WebSecProbe",
"url": "/article?view=webSecProbe-2080",
"url": "/article.html?view=webSecProbe-2080",
"description": "Web Application Vulnerability Scanning using Python and browser automation libraries allowing efficient scanning of web application.",
"content": "loading...",
"featured": "false",
Expand All @@ -72,7 +72,7 @@
},
{
"title":"ShadowCipher",
"url":"/article?view=shadow-cipher-2080",
"url":"/article.html?view=shadow-cipher-2080",
"description":"A simple tool that allows you to generate wordlists based on first and last names. It provides various patterns and variations to create a wide range of potential words for password cracking, data analysis, or other purposes. ",
"content":"loading...",
"featured":"false",
Expand Down
87 changes: 53 additions & 34 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Krimson Squad | Blog</title>
<link rel="shortcut icon" href="./favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.0.2/tailwind.min.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Krimson Squad | Home</title>
<link rel="shortcut icon" href="./favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.0.2/tailwind.min.css">
</head>

<body onload="bring_posts()">
<header class="text-gray-400 bg-gray-900 body-font">
<header class="text-gray-400 bg-gray-900 body-font">
<div class="container mx-auto flex flex-wrap p-5 flex-col md:flex-row items-center">
<a class="flex title-font font-medium items-center text-white mb-4 md:mb-0">
<img src="https://avatars.githubusercontent.com/u/134789824?s=48&v=4" style="border-radius: 50%;">
<img src="https://avatars.githubusercontent.com/u/134789824?s=48&v=4" style="border-radius: 50%;">
<span class="ml-3 text-xl">Krimson Squad</span>
</a>
<nav class="md:ml-auto flex flex-wrap items-center text-base justify-center">
Expand All @@ -22,29 +24,34 @@
</nav>
</div>
<section class="text-gray-400 bg-gray-900 body-font">
<div class="container mx-auto flex px-5 py-24 md:flex-row flex-col items-center">
<div class="lg:flex-grow md:w-1/2 lg:pr-24 md:pr-16 flex flex-col md:items-start md:text-left mb-16 md:mb-0 items-center text-center">
<h1 class="title-font sm:text-4xl text-3xl mb-4 font-medium text-white">Recent Highlights:
<span class="lg:inline-block" id="highlighted_topic"></span>
</h1>
<p class="mb-8 leading-relaxed" id="highlighted_content"></p>
<div class="flex justify-center">
<button class="inline-flex text-white bg-indigo-500 border-0 py-2 px-6 focus:outline-none hover:bg-indigo-600 rounded text-lg" onclick="window.open('https://github.com/\\Krimson-Squad/\\andro-predom')">Source code</button>
<a href="/andro-predom"><button class="ml-4 inline-flex text-gray-400 bg-gray-800 border-0 py-2 px-6 focus:outline-none hover:bg-gray-700 hover:text-white rounded text-lg">See documentation</button></a>
</div>
</div>
<div class="lg:max-w-lg lg:w-full md:w-1/2 w-5/6">
<img class="object-cover object-center rounded" alt="hero" id="highlighted_banner" src="">
<div class="container mx-auto flex px-5 py-24 md:flex-row flex-col items-center">
<div
class="lg:flex-grow md:w-1/2 lg:pr-24 md:pr-16 flex flex-col md:items-start md:text-left mb-16 md:mb-0 items-center text-center">
<h1 class="title-font sm:text-4xl text-3xl mb-4 font-medium text-white">Recent Highlights:
<span class="lg:inline-block" id="highlighted_topic">Loading...</span>
</h1>
<p class="mb-8 leading-relaxed" id="highlighted_content">loading..</p>
<div class="flex justify-center">
<button
class="inline-flex text-white bg-indigo-500 border-0 py-2 px-6 focus:outline-none hover:bg-indigo-600 rounded text-lg"
onclick="window.open('https://github.com/\\Krimson-Squad/\\andro-predom')">Source code</button>
<a href="/andro-predom"><button
class="ml-4 inline-flex text-gray-400 bg-gray-800 border-0 py-2 px-6 focus:outline-none hover:bg-gray-700 hover:text-white rounded text-lg">See
documentation</button></a>
</div>
</div>
</section>
<div class="lg:max-w-lg lg:w-full md:w-1/2 w-5/6">
<img class="object-cover object-center rounded" alt="hero" id="highlighted_banner" src="https://dummyimage.com/720x600">
</div>
</div>
</section>
</header>
<!-- blog -->
<section class="text-gray-400 bg-gray-900 body-font">
<div class="container px-5 py-24 mx-auto">
<div class="flex flex-wrap -m-4" id="blog_container">
<!-- blog 1 -->

</div>
</div>
</section>
Expand All @@ -54,38 +61,50 @@ <h1 class="title-font sm:text-4xl text-3xl mb-4 font-medium text-white">Recent H
<a class="flex title-font font-medium items-center md:justify-start justify-center text-white">
<img src="https://avatars.githubusercontent.com/u/134789824?s=48&v=4" style="border-radius: 50%;">
<span class="ml-3 text-xl">Krimson Squad</span>
</a>
<p class="text-sm text-gray-400 sm:ml-4 sm:pl-4 sm:border-l-2 sm:border-gray-800 sm:py-2 sm:mt-0 mt-4">© 2023 Krimson Squad —
<a href="https://github.com/Krimson-Squad class="text-gray-500 ml-1" target="_blank" rel="noopener noreferrer">@devsdenepal</a>
</a>
<p class="text-sm text-gray-400 sm:ml-4 sm:pl-4 sm:border-l-2 sm:border-gray-800 sm:py-2 sm:mt-0 mt-4">© 2023
Krimson Squad —
<a href="https://github.com/Krimson-Squad class=" text-gray-500 ml-1" target="_blank"
rel="noopener noreferrer">@devsdenepal</a>
</p>
<span class="inline-flex sm:ml-auto sm:mt-0 mt-4 justify-center sm:justify-start">
<a class="text-gray-400">
<svg fill="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-5 h-5" viewBox="0 0 24 24">
<svg fill="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-5 h-5"
viewBox="0 0 24 24">
<path d="M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z"></path>
</svg>
</a>
<a class="ml-3 text-gray-400">
<svg fill="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-5 h-5" viewBox="0 0 24 24">
<path d="M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z"></path>
<svg fill="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-5 h-5"
viewBox="0 0 24 24">
<path
d="M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z">
</path>
</svg>
</a>
<a class="ml-3 text-gray-400">
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-5 h-5" viewBox="0 0 24 24">
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
class="w-5 h-5" viewBox="0 0 24 24">
<rect width="20" height="20" x="2" y="2" rx="5" ry="5"></rect>
<path d="M16 11.37A4 4 0 1112.63 8 4 4 0 0116 11.37zm1.5-4.87h.01"></path>
</svg>
</a>
<a class="ml-3 text-gray-400">
<svg fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="0" class="w-5 h-5" viewBox="0 0 24 24">
<path stroke="none" d="M16 8a6 6 0 016 6v7h-4v-7a2 2 0 00-2-2 2 2 0 00-2 2v7h-4v-7a6 6 0 016-6zM2 9h4v12H2z"></path>
<svg fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"
class="w-5 h-5" viewBox="0 0 24 24">
<path stroke="none"
d="M16 8a6 6 0 016 6v7h-4v-7a2 2 0 00-2-2 2 2 0 00-2 2v7h-4v-7a6 6 0 016-6zM2 9h4v12H2z"></path>
<circle cx="4" cy="4" r="2" stroke="none"></circle>
</svg>
</a>
</span>
</div>
</footer>
<!-- 100% privacy-first analytics -->
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt=""
referrerpolicy="no-referrer-when-downgrade" /></noscript>
<script src="assets/js/main.js"></script>
</body></html>
</body>

</html>

0 comments on commit d1461ea

Please sign in to comment.