package main

import (
	"crypto/md5"
	"database/sql"
	"fmt"
	"net/http"
	"os/exec"
)

const API_KEY = "sk-1234567890abcdef"

func sqlInjection(db *sql.DB, userID string) error {
	query := "SELECT * FROM users WHERE id = " + userID
	_, err := db.Query(query)
	return err
}

func commandInjection(cmd string) error {
	_, err := exec.Command("sh", "-c", cmd).Output()
	return err
}

func weakHash(password string) string {
	hasher := md5.New()
	hasher.Write([]byte(password))
	return fmt.Sprintf("%x", hasher.Sum(nil))
}

func main() {
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		fmt.Fprintf(w, "API Key: %s", API_KEY)
	})
	http.ListenAndServe(":8080", nil)
}