mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+2
-3
@@ -47,12 +47,11 @@ parabotv2/src/META-INF/MANIFEST.MF
|
||||
|
||||
.idea/uiDesigner.xml
|
||||
|
||||
<<<<<<< HEAD
|
||||
.idea/libraries/jfxrt.xml
|
||||
=======
|
||||
*.jar
|
||||
|
||||
*.classpath
|
||||
|
||||
*.project
|
||||
>>>>>>> 18cffe02674768c9927a96cc05d2ae09e803974d
|
||||
|
||||
*.xml
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.parabot.core.proxy;
|
||||
|
||||
import socks.Socks4Proxy;
|
||||
import socks.Socks5Proxy;
|
||||
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
/**
|
||||
* User: Jeroen
|
||||
* Date: 18/02/14
|
||||
* Time: 16:54
|
||||
*/
|
||||
public class Proxy {
|
||||
public static Socks5Proxy proxy5;
|
||||
public static Socks4Proxy proxy4;
|
||||
|
||||
public static void setProxy4() throws UnknownHostException {
|
||||
|
||||
}
|
||||
|
||||
public static void setProxy5() throws UnknownHostException {
|
||||
proxy5 = new Socks5Proxy("80.63.56.146", 1080);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
setProxy5();
|
||||
}
|
||||
}
|
||||
@@ -100,10 +100,12 @@ public class BotUI extends JFrame implements ActionListener {
|
||||
case "Exit":
|
||||
System.exit(0);
|
||||
break;
|
||||
case "Network":
|
||||
System.out.println("Starting up the proxy UI");
|
||||
//NetworkUI.main();
|
||||
break;
|
||||
default:
|
||||
System.out.println("Invalid command: ");
|
||||
System.out.println("Invalid command: " + command);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
package org.parabot.core.ui;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
public class NetworkUI {
|
||||
|
||||
private JFrame frame;
|
||||
private JTextField proxyHostField;
|
||||
private JTextField proxyPortField;
|
||||
private HashMap<String, Integer> socksVersions = new HashMap<>();
|
||||
|
||||
public NetworkUI() {
|
||||
initialize();
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
NetworkUI window = new NetworkUI();
|
||||
window.frame.setVisible(true);
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
socksVersions.put("Socks 4", 4);
|
||||
socksVersions.put("Socks 5", 5);
|
||||
frame = new JFrame();
|
||||
frame.setResizable(false);
|
||||
frame.setBounds(100, 100, 450, 300);
|
||||
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
frame.getContentPane().setLayout(null);
|
||||
|
||||
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
||||
tabbedPane.setBounds(6, 6, 438, 233);
|
||||
frame.getContentPane().add(tabbedPane);
|
||||
|
||||
JPanel proxy = new JPanel();
|
||||
tabbedPane.addTab("Proxy", null, proxy, null);
|
||||
proxy.setLayout(null);
|
||||
|
||||
JLabel socksOption = new JLabel("Socks version");
|
||||
socksOption.setBounds(6, 6, 87, 16);
|
||||
proxy.add(socksOption);
|
||||
|
||||
final JComboBox socksOptions = new JComboBox();
|
||||
for (String key : socksVersions.keySet()) {
|
||||
socksOptions.addItem(key);
|
||||
}
|
||||
socksOptions.setBounds(105, 2, 127, 27);
|
||||
proxy.add(socksOptions);
|
||||
|
||||
JLabel proxyHost = new JLabel("Proxy host");
|
||||
proxyHost.setBounds(6, 66, 87, 16);
|
||||
proxy.add(proxyHost);
|
||||
|
||||
proxyHostField = new JTextField();
|
||||
proxyHostField.setBounds(105, 60, 127, 28);
|
||||
proxy.add(proxyHostField);
|
||||
proxyHostField.setColumns(10);
|
||||
|
||||
JLabel proxyPort = new JLabel("Proxy port");
|
||||
proxyPort.setBounds(6, 126, 87, 16);
|
||||
proxy.add(proxyPort);
|
||||
|
||||
proxyPortField = new JTextField();
|
||||
proxyPortField.setBounds(105, 120, 127, 28);
|
||||
proxy.add(proxyPortField);
|
||||
proxyPortField.setColumns(10);
|
||||
|
||||
JPanel macAddress = new JPanel();
|
||||
tabbedPane.addTab("Mac address", null, macAddress, null);
|
||||
macAddress.setLayout(null);
|
||||
|
||||
JLabel enableSpoofer = new JLabel("Enable spoofer");
|
||||
enableSpoofer.setBounds(6, 80, 99, 16);
|
||||
macAddress.add(enableSpoofer);
|
||||
|
||||
final ButtonGroup bg = new ButtonGroup();
|
||||
JRadioButton spooferYes = new JRadioButton("Yes");
|
||||
spooferYes.setBounds(117, 76, 59, 23);
|
||||
macAddress.add(spooferYes);
|
||||
|
||||
JRadioButton spooferNo = new JRadioButton("No");
|
||||
spooferNo.setBounds(188, 76, 59, 23);
|
||||
macAddress.add(spooferNo);
|
||||
spooferNo.setSelected(true);
|
||||
|
||||
bg.add(spooferYes);
|
||||
bg.add(spooferNo);
|
||||
|
||||
JButton submit = new JButton("Submit");
|
||||
submit.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
System.out.println(socksVersions.get(socksOptions.getSelectedItem()));
|
||||
}
|
||||
});
|
||||
submit.setBounds(327, 243, 117, 29);
|
||||
frame.getContentPane().add(submit);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user