This repository was archived by the owner on Nov 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathblackboxai.php
More file actions
59 lines (52 loc) · 1.36 KB
/
blackboxai.php
File metadata and controls
59 lines (52 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/*
@ExploitNeT
@ImSoheilOfficial
Usage : example.com/blackboxai.php?text=Hello&mode=1
*/
$txt = $_GET['text'];
$mode = $_GET['mode'];
if($mode == '1'){
$webk = true;
} else {
$webk = false;
}
header('Content-type: application/json; charset=utf-8');
$url = 'https://www.blackbox.ai/api/chat';
$data = [
'messages' => [
[
'id' => '6cdrFCv',
'content' => $txt,
'role' => 'user'
]
],
'id' => '6clrFCv',
'previewToken' => null,
'userId' => '0d264665-73ae-498f-aa3f-4b7b65997963',
'codeModelMode' => true,
'agentMode' => [],
'trendingAgentMode' => [],
'isMicMode' => false,
'isChromeExt' => false,
'githubToken' => null,
'webSearchMode' => $webk,// mode
'maxTokens' => "10240"
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
if ($result === false) {
echo "Error: " . curl_error($ch);
} else {
echo json_encode([
'status' => true,
'Creator' => "@ExploitNeT - @ImSoheilOfficial",
'data' => $result,
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
}
curl_close($ch);
?>