From 95087933be270217ab7eb5adf026dc1406b72378 Mon Sep 17 00:00:00 2001 From: jr-boney Date: Wed, 20 Nov 2024 23:41:45 +0530 Subject: [PATCH] commit --- app/api/search/route.ts | 27 ------- app/globals.css | 2 +- app/layout.tsx | 15 ++-- app/page.tsx | 172 +++++++++++++++++++++++++++++++++------- app/search/page.tsx | 13 +++ package-lock.json | 12 ++- package.json | 2 +- postcss.config.js | 6 ++ tailwind.config.js | 9 --- tailwind.config.ts | 44 ++++++++-- 10 files changed, 219 insertions(+), 83 deletions(-) delete mode 100644 app/api/search/route.ts create mode 100644 app/search/page.tsx create mode 100644 postcss.config.js delete mode 100644 tailwind.config.js diff --git a/app/api/search/route.ts b/app/api/search/route.ts deleted file mode 100644 index eed64b2..0000000 --- a/app/api/search/route.ts +++ /dev/null @@ -1,27 +0,0 @@ -// app/api/search/route.ts -import { NextResponse } from "next/server"; -import Fuse from "fuse.js"; - -const dorksData = [ - { title: "Admin Login Page", query: 'inurl:"admin/login"' }, - { title: "Sensitive Files", query: 'filetype:pdf "confidential"' }, - { title: "Login Page", query: 'inurl:"login.php"' }, - { title: "Vulnerable Website", query: 'inurl:"/phpinfo.php"' }, -]; - -const fuse = new Fuse(dorksData, { - keys: ["title", "query"], - threshold: 0.3, -}); - -export async function GET(req: Request) { - const { searchQuery } = req.url; - - if (!searchQuery) { - return NextResponse.json({ error: "No search query provided" }, { status: 400 }); - } - - const results = fuse.search(searchQuery); - - return NextResponse.json(results); -} diff --git a/app/globals.css b/app/globals.css index 6a1c67d..3604f99 100644 --- a/app/globals.css +++ b/app/globals.css @@ -16,7 +16,7 @@ body { } .search-container input { - width: 100%; + width: 40%; padding: 12px; border-radius: 8px; border: 1px solid #ccc; diff --git a/app/layout.tsx b/app/layout.tsx index 44129a6..a75c05e 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,4 +1,3 @@ -// app/layout.tsx import React from 'react'; import './globals.css'; // Import global styles (Tailwind, custom CSS) import Link from 'next/link'; @@ -18,27 +17,27 @@ export default function Layout({ rel="stylesheet" /> - +

Google Dorks for Bug Bounty

-
+
{/* This is where the content of each individual page will be rendered */} {children}
-