- Pastikan Python 3.7+ terinstal di sistem Anda.
- Install dependensi yang diperlukan:
pip install flask mysql-connector-python requests - Unduh file
security_test_bot.pyke direktori kerja Anda.
Untuk menjalankan bot:
- Buka terminal atau command prompt.
- Navigasi ke direktori tempat
security_test_bot.pyberada. - Jalankan perintah:
python security_test_bot.py - Server akan berjalan di
http://localhost:5000.
- Metode: POST
- Deskripsi: Berinteraksi dengan bot untuk mendapatkan informasi.
- Body request:
{ "message": "pesan Anda di sini" }
- Metode: POST
- Deskripsi: Melakukan pengujian keamanan dasar pada website.
- Body request:
{ "url": "https://contoh.com" }
- Metode: POST
- Deskripsi: Melakukan pengujian SQL Injection.
- Body request:
{ "query": "SELECT * FROM users WHERE id = %s", "params": [1] }
- Metode: POST
- Deskripsi: Melakukan pengujian Cross-Site Scripting (XSS).
- Body request:
{ "input": "<script>alert('XSS')</script>" }
curl -X POST http://localhost:5000/bot -H "Content-Type: application/json" -d '{"message": "halo"}'curl -X POST http://localhost:5000/test_website -H "Content-Type: application/json" -d '{"url": "https://ngajilagi.id"}'curl -X POST http://localhost:5000/test_sql_injection -H "Content-Type: application/json" -d '{"query": "SELECT * FROM users WHERE id = %s", "params": [1]}'curl -X POST http://localhost:5000/test_xss -H "Content-Type: application/json" -d '{"input": "<script>alert('XSS')</script>"}'