@@ -8,7 +8,6 @@ interface HashDocument {
|
||||
sha1: string;
|
||||
sha256: string;
|
||||
sha512: string;
|
||||
bcrypt: string;
|
||||
created_at?: string;
|
||||
}
|
||||
|
||||
@@ -44,7 +43,7 @@ export async function POST(request: NextRequest) {
|
||||
index: INDEX_NAME,
|
||||
query: {
|
||||
term: {
|
||||
[hashType]: hashType === 'bcrypt' ? cleanQuery : cleanQueryLower
|
||||
[hashType]: cleanQueryLower
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -66,7 +65,6 @@ export async function POST(request: NextRequest) {
|
||||
sha1: source.sha1,
|
||||
sha256: source.sha256,
|
||||
sha512: source.sha512,
|
||||
bcrypt: source.bcrypt,
|
||||
}
|
||||
};
|
||||
})
|
||||
@@ -101,11 +99,10 @@ export async function POST(request: NextRequest) {
|
||||
sha1: existingDoc.sha1,
|
||||
sha256: existingDoc.sha256,
|
||||
sha512: existingDoc.sha512,
|
||||
bcrypt: existingDoc.bcrypt,
|
||||
};
|
||||
} else {
|
||||
// Plaintext not found, generate hashes and check if any hash already exists
|
||||
hashes = await generateHashes(cleanQuery);
|
||||
hashes = generateHashes(cleanQuery);
|
||||
|
||||
const hashExistsResponse = await esClient.search<HashDocument>({
|
||||
index: INDEX_NAME,
|
||||
@@ -147,7 +144,6 @@ export async function POST(request: NextRequest) {
|
||||
sha1: hashes.sha1,
|
||||
sha256: hashes.sha256,
|
||||
sha512: hashes.sha512,
|
||||
bcrypt: hashes.bcrypt,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ const geistMono = Geist_Mono({
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Hasher - Hash Search & Generator",
|
||||
description: "Search for hashes or generate them from plaintext. Supports MD5, SHA1, SHA256, SHA512, and Bcrypt. Powered by Elasticsearch.",
|
||||
keywords: ["hash", "md5", "sha1", "sha256", "sha512", "bcrypt", "hash generator", "hash search", "elasticsearch"],
|
||||
description: "Search for hashes or generate them from plaintext. Supports MD5, SHA1, SHA256, and SHA512. Powered by Elasticsearch.",
|
||||
keywords: ["hash", "md5", "sha1", "sha256", "sha512", "hash generator", "hash search", "elasticsearch"],
|
||||
authors: [{ name: "Hasher" }],
|
||||
creator: "Hasher",
|
||||
publisher: "Hasher",
|
||||
@@ -28,7 +28,7 @@ export const metadata: Metadata = {
|
||||
openGraph: {
|
||||
type: "website",
|
||||
title: "Hasher - Hash Search & Generator",
|
||||
description: "Search for hashes or generate them from plaintext. Supports MD5, SHA1, SHA256, SHA512, and Bcrypt.",
|
||||
description: "Search for hashes or generate them from plaintext. Supports MD5, SHA1, SHA256, and SHA512.",
|
||||
siteName: "Hasher",
|
||||
images: [
|
||||
{
|
||||
@@ -42,7 +42,7 @@ export const metadata: Metadata = {
|
||||
twitter: {
|
||||
card: "summary",
|
||||
title: "Hasher - Hash Search & Generator",
|
||||
description: "Search for hashes or generate them from plaintext. Supports MD5, SHA1, SHA256, SHA512, and Bcrypt.",
|
||||
description: "Search for hashes or generate them from plaintext. Supports MD5, SHA1, SHA256, and SHA512.",
|
||||
images: ["/logo.png"],
|
||||
},
|
||||
viewport: {
|
||||
|
||||
@@ -15,7 +15,6 @@ interface SearchResult {
|
||||
sha1: string;
|
||||
sha256: string;
|
||||
sha512: string;
|
||||
bcrypt: string;
|
||||
};
|
||||
results?: Array<{
|
||||
plaintext: string;
|
||||
@@ -24,7 +23,6 @@ interface SearchResult {
|
||||
sha1: string;
|
||||
sha256: string;
|
||||
sha512: string;
|
||||
bcrypt: string;
|
||||
};
|
||||
}>;
|
||||
message?: string;
|
||||
@@ -144,7 +142,7 @@ export default function Home() {
|
||||
Search for hashes or generate them from plaintext
|
||||
</p>
|
||||
<p className="text-sm text-gray-500 mt-2">
|
||||
Supports MD5, SHA1, SHA256, SHA512, and Bcrypt
|
||||
Supports MD5, SHA1, SHA256, and SHA512
|
||||
</p>
|
||||
{stats && (
|
||||
<div className="flex items-center justify-center gap-4 mt-4 text-sm text-gray-500">
|
||||
@@ -214,7 +212,6 @@ export default function Home() {
|
||||
<HashDisplay label="SHA1" value={result.hashes!.sha1} field="sha1-gen" />
|
||||
<HashDisplay label="SHA256" value={result.hashes!.sha256} field="sha256-gen" />
|
||||
<HashDisplay label="SHA512" value={result.hashes!.sha512} field="sha512-gen" />
|
||||
<HashDisplay label="Bcrypt" value={result.hashes!.bcrypt} field="bcrypt-gen" />
|
||||
</div>
|
||||
{result.wasGenerated && (
|
||||
<div className="mt-6 bg-blue-50 border border-blue-200 rounded-xl p-4">
|
||||
@@ -260,7 +257,6 @@ export default function Home() {
|
||||
<HashDisplay label="SHA1" value={item.hashes.sha1} field={`sha1-${idx}`} />
|
||||
<HashDisplay label="SHA256" value={item.hashes.sha256} field={`sha256-${idx}`} />
|
||||
<HashDisplay label="SHA512" value={item.hashes.sha512} field={`sha512-${idx}`} />
|
||||
<HashDisplay label="Bcrypt" value={item.hashes.bcrypt} field={`bcrypt-${idx}`} />
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
@@ -304,7 +300,7 @@ export default function Home() {
|
||||
</div>
|
||||
<h3 className="text-xl font-bold text-gray-900 mb-2">Generate Hashes</h3>
|
||||
<p className="text-gray-600">
|
||||
Enter any plaintext to instantly generate MD5, SHA1, SHA256, SHA512, and Bcrypt hashes. Results are saved automatically.
|
||||
Enter any plaintext to instantly generate MD5, SHA1, SHA256, and SHA512 hashes. Results are saved automatically.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Referencia en una nueva incidencia
Block a user