Skip to content

Commit

Permalink
add dashboard blog system
Browse files Browse the repository at this point in the history
  • Loading branch information
devsdenepal committed Nov 18, 2023
1 parent 31516dc commit cc08ddf
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 46 deletions.
48 changes: 48 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
function bring_posts() {
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.featured == "true") {
console.table(page);
document.getElementById("highlighted_topic").innerText = page.title;
document.getElementById("highlighted_content").innerText = page.description;
document.getElementById("highlighted_banner").src = page.image_url;
}
else {
var blog_container=document.getElementById("blog_container");
blog_container.innerHTML+=`
<div class="p-4 lg:w-1/3">
<div class="h-full bg-gray-800 bg-opacity-40 px-8 pt-16 pb-24 rounded-lg overflow-hidden text-center relative">
<h2 class="tracking-widest text-xs title-font font-medium text-gray-500 mb-1">${page.tag}</h2>
<h1 class="title-font sm:text-2xl text-xl font-medium text-white mb-3">${page.title}</h1>
<p class="leading-relaxed mb-3">${page.description}</p>
<a class="text-indigo-400 inline-flex items-center" href="${page.url}" target="_blank">Read
<svg class="w-4 h-4 ml-2" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 12h14"></path>
<path d="M12 5l7 7-7 7"></path>
</svg>
</a>
</div>
</div>
`
// console.warn("no page is featured");
}
});
// console.log(result.pages)
// console.table(result)
//
} else {
console.error("XHR request failed with status code:", xhr.status);
}
};
xhr.send();
}

84 changes: 84 additions & 0 deletions data/json/post.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"result": [
{
"title": "Andro-Predom",
"url": "/article?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",
"image_url": "https://github.com/devsdenepal/andro-predom/raw/main/ScreenShot_20230101193530.jpeg",
"github_link": "https://github.com/Krimson-Squad/andro-predom",
"tag": "Shell"
},
{
"title": "AndherNagri",
"url": "/article?view=andhernagri-2080",
"description": "A vulnerable site to practice XSS and SQL injection.",
"content": "loading...",
"featured": "false",
"image_url": "N/A",
"github_link": "https://github.com/Krimson-Squad/AndherNagri",
"tag": "PHP"
},
{
"title": "xupa-rustam",
"url": "/article?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",
"image_url": "N/A",
"github_link": "https://github.com/Krimson-Squad/xupa-rustam",
"tag": "Python"
},
{
"title": "PhantomBlitz",
"url": "/article?view=phantomblitz-2080",
"description": "PhantomBlitz: Yet another tool for reverse shell execution & payload generator by Dev. Gautam Kumar ",
"content": "loading...",
"featured": "false",
"image_url": "N/A",
"github_link": "https://github.com/Krimson-Squad/PhantomBlitz",
"tag": "Python"
},
{
"title": "unvetion",
"url": "/article?view=unvetion-2080",
"description": "MINI RECON PROJECT.",
"content": "loading...",
"featured": "false",
"image_url": "N/A",
"github_link": "https://github.com/Krimson-Squad/unvetion",
"tag": "Python"
},
{
"title": "Common Techniques & Software ",
"url": "/article?view=common-techniques-n-software-2080",
"description": "List of common T1 and SO(s) used by Threat groups.",
"content": "loading...",
"featured": "false",
"image_url": "N/A",
"github_link": "https://github.com/Krimson-Squad/common-techniques-n-software",
"tag": "Markdown"
},
{
"title": "WebSecProbe",
"url": "/article?view=webSecProbe-2080",
"description": "Web Application Vulnerability Scanning using Python and browser automation libraries allowing efficient scanning of web application.",
"content": "loading...",
"featured": "false",
"image_url": "N/A",
"github_link": "https://github.com/Krimson-Squad/WebSecProbe",
"tag": "Python"
},
{
"title":"ShadowCipher",
"url":"/article?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",
"image_url":"N/A",
"github_link":"https://github.com/Krimson-Squad/ShadowCipher",
"tag":"Python"
}
]
}
53 changes: 7 additions & 46 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<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>
<body onload="bring_posts()">
<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">
Expand All @@ -25,66 +25,26 @@
<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:
<br class="hidden lg:inline-block">Android Predom
<span class="lg:inline-block" id="highlighted_topic"></span>
</h1>
<p class="mb-8 leading-relaxed">Android-Predom is a powerful and versatile tool for Android app development. It is user-friendly, does not require root access, and is actively being updated by the developer. The tool is a part of a larger project called "PREDOMINANT" which aims to provide a comprehensive set of tools for Android app development. We hope that you will give Android-Predom a try and experience the benefits it has to offer.</p>
<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" src="https://github.com/devsdenepal/andro-predom/raw/main/ScreenShot_20230101193530.jpeg">
<img class="object-cover object-center rounded" alt="hero" id="highlighted_banner" src="">
</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">
<div class="flex flex-wrap -m-4" id="blog_container">
<!-- blog 1 -->
<div class="p-4 lg:w-1/3">
<div class="h-full bg-gray-800 bg-opacity-40 px-8 pt-16 pb-24 rounded-lg overflow-hidden text-center relative">
<h2 class="tracking-widest text-xs title-font font-medium text-gray-500 mb-1">PHP</h2>
<h1 class="title-font sm:text-2xl text-xl font-medium text-white mb-3">AndherNagri</h1>
<p class="leading-relaxed mb-3">A vulnerable site to practice XSS and SQL injection.</p>
<a class="text-indigo-400 inline-flex items-center" >Learn More
<svg class="w-4 h-4 ml-2" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 12h14"></path>
<path d="M12 5l7 7-7 7"></path>
</svg>
</a>
</div>
</div>
<!-- bl2 -->
<div class="p-4 lg:w-1/3">
<div class="h-full bg-gray-800 bg-opacity-40 px-8 pt-16 pb-24 rounded-lg overflow-hidden text-center relative">
<h2 class="tracking-widest text-xs title-font font-medium text-gray-500 mb-1">PYTHON</h2>
<h1 class="title-font sm:text-2xl text-xl font-medium text-white mb-3"> xupa-rustam</h1>
<p class="leading-relaxed mb-3">Python based Pentesting Brute-Force tool to crack username and password of a simple traditional website </p>
<a class="text-indigo-400 inline-flex items-center">Learn More
<svg class="w-4 h-4 ml-2" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 12h14"></path>
<path d="M12 5l7 7-7 7"></path>
</svg>
</a>
</div>
</div>
<!-- bl3 -->
<div class="p-4 lg:w-1/3">
<div class="h-full bg-gray-800 bg-opacity-40 px-8 pt-16 pb-24 rounded-lg overflow-hidden text-center relative">
<h2 class="tracking-widest text-xs title-font font-medium text-gray-500 mb-1">PYTHON</h2>
<h1 class="title-font sm:text-2xl text-xl font-medium text-white mb-3"> PhantomBlitz </h1>
<p class="leading-relaxed mb-3">PhantomBlitz: Yet another tool for reverse shell execution & payload generator by Dev. Gautam Kumar </p>
<a class="text-indigo-400 inline-flex items-center">Learn More
<svg class="w-4 h-4 ml-2" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 12h14"></path>
<path d="M12 5l7 7-7 7"></path>
</svg>
</a>
</div>
</div>

</div>
</div>
</section>
Expand Down Expand Up @@ -124,4 +84,5 @@ <h1 class="title-font sm:text-2xl text-xl font-medium text-white mb-3"> PhantomB
</span>
</div>
</footer>
<script src="assets/js/main.js"></script>
</body></html>

0 comments on commit cc08ddf

Please sign in to comment.