package exploitpack;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;

/**
 *
 * @author jsacco
 */
public class Exploit {

    private String ModuleName;
    private String CodeName;
    private String Type;
    private String Platform;
    private String Service;
    private String ShellcodePort;
    private String RemotePort;
    private String ShellcodeAvail;
    private String Information;
    private String SpecialArgs;
    private String Author;
    private String Vulnerability;
    private String Targets;

    public String getModuleName() {
        return ModuleName;
    }

    public String getCodeName() {
        return CodeName;
    }

    public String getType() {
        return Type;
    }

    public String getPlatform() {
        return Platform;
    }

    public String getService() {
        return Service;
    }

    public String getShellcodePort() {
        return ShellcodePort;
    }

    public String getRemotePort() {
        return RemotePort;
    }

    public void setModuleName(String ModuleName) {
        this.ModuleName = ModuleName;
    }

    public void setCodeName(String CodeName) {
        this.CodeName = CodeName;
    }

    public void setType(String Type) {
        this.Type = Type;
    }

    public void setPlatform(String Platform) {
        this.Platform = Platform;
    }

    public void setService(String Service) {
        this.Service = Service;
    }

    public void setShellcodePort(String ShellcodePort) {
        this.ShellcodePort = ShellcodePort;
    }

    public void setRemotePort(String RemotePort) {
        this.RemotePort = RemotePort;
    }

    public String getShellcodeAvail() {
        return ShellcodeAvail;
    }

    public void setShellcodeAvail(String ShellcodeAvail) {
        this.ShellcodeAvail = ShellcodeAvail;
    }

    public String getInformation() {
        return Information;
    }

    public void setInformation(String Information) {
        this.Information = Information;
    }

    public String getSpecialArgs() {
        return SpecialArgs;
    }

    public void setSpecialArgs(String SpecialArgs) {
        this.SpecialArgs = SpecialArgs;
    }

    public String getAuthor() {
        return Author;
    }

    public void setAuthor(String Author) {
        this.Author = Author;
    }

    public String getVulnerability() {
        return Vulnerability;
    }

    public void setVulnerability(String Vulnerability) {
        this.Vulnerability = Vulnerability;
    }

    public String getTargets() {
        return Targets;
    }

    public void setTargets(String Targets) {
        this.Targets = Platform;
    }

    public static String getIpExternal() throws Exception {
        URL whatismyip = new URL("http://checkip.amazonaws.com");
        BufferedReader in = null;
        try {
            in = new BufferedReader(new InputStreamReader(
                    whatismyip.openStream()));
            String ip = in.readLine();
            return ip;
        } finally {
            if (in != null) {
                try {
                    in.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
