Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

17321140528809194239067707915358

sql_injection

Instalasi

  1. Pastikan Python 3.7+ terinstal di sistem Anda.
  2. Install dependensi yang diperlukan:
    pip install flask mysql-connector-python requests
    
  3. Unduh file security_test_bot.py ke direktori kerja Anda.

Penggunaan Bot

Untuk menjalankan bot:

  1. Buka terminal atau command prompt.
  2. Navigasi ke direktori tempat security_test_bot.py berada.
  3. Jalankan perintah:
    python security_test_bot.py
    
  4. Server akan berjalan di http://localhost:5000.

Endpoint API

1. /bot

  • Metode: POST
  • Deskripsi: Berinteraksi dengan bot untuk mendapatkan informasi.
  • Body request:
    {
      "message": "pesan Anda di sini"
    }

2. /test_website

  • Metode: POST
  • Deskripsi: Melakukan pengujian keamanan dasar pada website.
  • Body request:
    {
      "url": "https://contoh.com"
    }

3. /test_sql_injection

  • Metode: POST
  • Deskripsi: Melakukan pengujian SQL Injection.
  • Body request:
    {
      "query": "SELECT * FROM users WHERE id = %s",
      "params": [1]
    }

4. /test_xss

  • Metode: POST
  • Deskripsi: Melakukan pengujian Cross-Site Scripting (XSS).
  • Body request:
    {
      "input": "<script>alert('XSS')</script>"
    }

Contoh Penggunaan

Menggunakan Bot

curl -X POST http://localhost:5000/bot -H "Content-Type: application/json" -d '{"message": "halo"}'

Menguji Website

curl -X POST http://localhost:5000/test_website -H "Content-Type: application/json" -d '{"url": "https://ngajilagi.id"}'

Menguji SQL Injection

curl -X POST http://localhost:5000/test_sql_injection -H "Content-Type: application/json" -d '{"query": "SELECT * FROM users WHERE id = %s", "params": [1]}'

Menguji XSS

curl -X POST http://localhost:5000/test_xss -H "Content-Type: application/json" -d '{"input": "<script>alert('XSS')</script>"}'

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages