POST
/api/tools/obfuscator
Menerima kode JavaScript dalam bentuk teks dan mengembalikannya dalam format yang sudah ter-obfuscate.
Query Parameters:
Key | Tipe | Wajib | Deskripsi |
---|---|---|---|
apikey | String | Ya | API Key Anda yang valid. |
Request Body:
Anda harus mengirim request dengan body berformat raw JSON dengan struktur sebagai berikut:
Key | Tipe | Wajib | Deskripsi |
---|---|---|---|
code | String | Ya | Teks kode JavaScript yang ingin Anda obfuscate. |
Contoh Request (cURL):
curl -X POST "https://api.danafxc.my.id/api/tools/obfuscator?apikey=your_apikey" \
-H "Content-Type: application/json" \
-d '{"code": "function hello() { console.log(\"Hello, World!\"); }"}'
Contoh Respons Sukses (200 OK):
{
"status": true,
"message": "Kode berhasil diobfuscate.",
"obfuscatedCode": "function hello(){var _0x5f3b=['Hello, World!','log'];(function(_0x4b7f8b,_0x5f3b6d){ ... })console[_0x5f3b[1]](_0x5f3b[0])};"
}
Contoh Respons Error (400 Bad Request):
{
"status": false,
"message": "Gagal melakukan obfuscate. Pastikan kode yang Anda masukkan adalah JavaScript yang valid.",
"error": "Line 1: Unexpected token"
}