-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a43acb
commit 38c1b32
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
title: "چالش ۱۰" | ||
date: 2025-01-01T00:00:00+04:30 | ||
persianDate: 1403-10-15 | ||
layout: post | ||
summary: با فریب دادن AI کلمه رمز رو به دست بیارید | ||
type: news | ||
darft: true | ||
--- | ||
{{< rawhtml >}} | ||
<style> | ||
.highlight { | ||
background-color: #303030; | ||
} | ||
code { | ||
direction: ltr; | ||
} | ||
</style> | ||
{{< /rawhtml >}} | ||
با فریب دادن AI کلمه رمز رو به دست بیارید. | ||
|
||
|
||
{{< rawhtml >}} | ||
|
||
<div class="box" style="padding: 20px; background: #2e2e2e; border: 1px solid #444; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4); text-align: center; direction: ltr; color: white;"> | ||
<div style="display: flex; gap: 10px; align-items: center;"> | ||
<input type="text" id="userInput" placeholder="Type something..." style="flex: 1; padding: 10px; border: 1px solid #555; border-radius: 4px; box-sizing: border-box; background: #1e1e1e; color: #fff;" /> | ||
<button id="sendButton" style="padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer;">Send</button> | ||
</div> | ||
<div class="response" id="responseDisplay" style="margin-top: 10px; padding: 10px; background: #3e3e3e; border: 1px solid #555; border-radius: 4px; color: #ddd;">response will be shown here.</div> | ||
</div> | ||
|
||
<script> | ||
document.getElementById('sendButton').addEventListener('click', async () => { | ||
const input = document.getElementById('userInput').value; | ||
const responseDisplay = document.getElementById('responseDisplay'); | ||
responseDisplay.textContent = 'Fetching data...'; | ||
|
||
try { | ||
const response = await fetch('https://challenge10.amiremohamadi.workers.dev/', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json' | ||
}, | ||
body: JSON.stringify({ prompt: input }) | ||
}); | ||
|
||
const result = await response.json(); | ||
responseDisplay.textContent = result.response; | ||
} catch (error) { | ||
responseDisplay.textContent = 'Error: Unable to fetch response.'; | ||
} | ||
}); | ||
</script> | ||
|
||
{{< /rawhtml >}} | ||
|
||
برای صحتسنجی جوابتون از هش زیر استفاده کنید: | ||
|
||
```bash | ||
$ echo 'BIRLUG{the_secret_word}' | md5sum | ||
2407d7bad3f39a6bb09319b6717bbd90 - | ||
``` |