APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:SUWAS SSH VPN
版本号:3.0
包名称:suwas.vpn.inject

MD5 校验值:1fc9c7d9bea45dd359a8e0644d6972ec

反编译源代码说明

PayloadGenerator.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package kpn.soft.dev.kpntunnel.activities;

import android.os.Bundle;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.Spinner;
import android.widget.SpinnerAdapter;
import kpn.soft.dev.kpntunnel.App;
import zph.graph.myapp.R;

public class PayloadGenerator extends android.support.v7.a.ae {
    private CheckBox D;
    private CheckBox m;
    private CheckBox n;
    private CheckBox o;
    private EditText p;
    private RadioButton q;
    private RadioButton r;
    private RadioButton s;
    private CheckBox t;
    private CheckBox u;
    private CheckBox v;
    private CheckBox w;
    private CheckBox x;
    private CheckBox y;
    private String[] z = {"CONNECT", "GET", "POST", "PUT", "HEAD", "TRACE", "OPTIONS", "PATCH", "PROPATCH", "DELETE", "MOVE"};
    private String A = "t.me/suwas/";
    private String B = "CONNECT";
    private String C = "CONNECT";

    private String a(String str) {
        String str2;
        String replace = str.replace("http://", "").replace("https://", "");
        if (replace.contains("/")) {
            replace = replace.split("/")[0];
        }
        if (this.t.isChecked()) {
            this.C = "[method] [host_port] [protocol]".replace("[host_port]", replace + "@[host_port]");
        } else if (this.u.isChecked()) {
            this.C = "[method] [host_port] [protocol]".replace("[host_port]", "[host_port]@" + replace);
        }
        String replace2 = "METHOD URL HTTP/1.1".replace("METHOD", this.B).replace("URL", str);
        if (this.w.isChecked()) {
            replace2 = replace2 + "[crlf]Host: " + replace;
        }
        if (this.x.isChecked()) {
            if (!replace2.contains("Host: ")) {
                replace2 = replace2 + "[crlf]Host: " + replace;
            }
            replace2 = replace2 + "[crlf]X-Online-Host: " + replace;
        }
        if (this.y.isChecked()) {
            if (!replace2.contains("Host: ")) {
                replace2 = replace2 + "[crlf]Host: " + replace;
            }
            replace2 = replace2 + "[crlf]X-Forwarded-For: " + replace;
        }
        if (this.D.isChecked()) {
            replace2 = replace2 + "[crlf]User-Agent: [ua]";
        }
        if (this.v.isChecked()) {
            this.C += "[crlf]Connection: Keep-Alive[crlf]Proxy-Connection: Keep-Alive[crlf*2]";
            str2 = replace2 + "[crlf]Connection: Keep-Alive[crlf]Proxy-Connection: Keep-Alive[crlf*2]";
        } else if (this.t.isChecked() || this.u.isChecked()) {
            this.C += "[crlf*2]";
            str2 = replace2 + "[crlf*2]";
        } else {
            this.C = "[real_raw]";
            str2 = replace2 + "[crlf*2]";
        }
        return this.q.isChecked() ? this.C : this.r.isChecked() ? this.m.isChecked() ? str2 + "[split]" + this.C : str2 + this.C : this.s.isChecked() ? this.m.isChecked() ? this.C + "[split]" + str2 : this.C + str2 : "";
    }

    public void j() {
        String a2;
        String obj = this.p.getText().toString();
        if (obj.equals("") && !this.q.isChecked()) {
            App.a(null, "URL is empty");
            return;
        }
        if (this.n.isChecked() && obj.contains(";")) {
            String[] split = obj.split(";");
            int length = split.length;
            a2 = "";
            for (int i = 0; i < length; i++) {
                a2 = a2 + a(split[i]);
                if (i < length - 1) {
                    a2 = a2 + "[random]";
                }
            }
        } else if (this.o.isChecked() && obj.contains(";")) {
            String[] split2 = obj.split(";");
            int length2 = split2.length;
            a2 = "";
            for (int i2 = 0; i2 < length2; i2++) {
                a2 = a2 + a(split2[i2]);
                if (i2 < length2 - 1) {
                    a2 = a2 + "[repeat]";
                }
            }
        } else {
            a2 = a(obj);
        }
        App.a(a2.trim());
        App.a(null, "Payload generated");
        finish();
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        finish();
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.payload_generator);
        android.support.v7.a.a f = f();
        if (f != null) {
            f.a(true);
        }
        getWindow().setSoftInputMode(3);
        this.n = (CheckBox) findViewById(R.id.payload_random);
        this.o = (CheckBox) findViewById(R.id.payload_repeat);
        this.m = (CheckBox) findViewById(R.id.payload_spit);
        Spinner spinner = (Spinner) findViewById(R.id.payload_method);
        this.p = (EditText) findViewById(R.id.payload_url);
        this.q = (RadioButton) findViewById(R.id.payload_normal_inject);
        this.r = (RadioButton) findViewById(R.id.payload_front_inject);
        this.s = (RadioButton) findViewById(R.id.payload_back_inject);
        this.t = (CheckBox) findViewById(R.id.payload_front_query);
        this.u = (CheckBox) findViewById(R.id.payload_back_query);
        this.v = (CheckBox) findViewById(R.id.payload_keep_alive);
        this.w = (CheckBox) findViewById(R.id.payload_host);
        this.x = (CheckBox) findViewById(R.id.payload_online_host);
        this.y = (CheckBox) findViewById(R.id.payload_reverse);
        this.D = (CheckBox) findViewById(R.id.payload_user_agent);
        Button button = (Button) findViewById(R.id.payload_generate);
        spinner.setAdapter((SpinnerAdapter) new ArrayAdapter(this, android.R.layout.simple_spinner_dropdown_item, this.z));
        spinner.setOnItemSelectedListener(new ah(this));
        this.n.setOnClickListener(new ai(this));
        this.o.setOnClickListener(new aj(this));
        this.t.setOnClickListener(new ak(this));
        this.u.setOnClickListener(new al(this));
        button.setOnClickListener(new am(this));
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        super.onOptionsItemSelected(menuItem);
        if (menuItem.getItemId() != 16908332) {
            return true;
        }
        finish();
        return true;
    }

    @Override
    public void onResume() {
        super.onResume();
        if (this.n.isChecked() || this.o.isChecked()) {
            this.p.setHint("t.me/suwas/;https://bug2.com/;etc");
        } else {
            this.p.setHint(this.A);
        }
    }
}