Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Realm of the Mad God Hacks & Cheats › Realm of the Mad God Tutorials & Source Code › ABC Packets to XML Java Parser

Thumbs upABC Packets to XML Java Parser

Posts 1–13 of 13 · Page 1 of 1
Alde.
Alde.
ABC Packets to XML Java Parser
ABC Packets to XML Java Parser

Convert
trait const QName(PackageNamespace("", "#0"), "FAILURE") slotid 1 type QName(PackageNamespace("", "#0"), "int") value Integer(0) end
To
<Packet id="FAILURE" type="0"/>

from a text file named data.txt from your C drive.

Code:
package games.flappybird; //Le flappybird

import java****.BufferedReader;
import java****.FileReader; //MPGH block these out, but you know what they are anyway.
import java********Exception;

public class AVSMtoXML {

		public static String finalText = "";
		
	    public static void main(String[] agrs) throws IOException {

	    	BufferedReader in = new BufferedReader(new FileReader("C:/data.txt"));

	    	while (in.ready()) {
	    	  String s = in.readLine();
	    	  parse(s);
	    	}
	    	in.close();
	    	
	    	System.out.println("Final string is : "+finalText);

	    }
	
	    
	    
	public static void parse(String parse){
		
		

		/* References : */
		//Initial : trait const QName(PackageNamespace("", "#0"), "ACCEPTTRADE") slotid 58 type QName(PackageNamespace("", "#0"), "int") value Integer(76) end
		//Final : <Packet id="CREATE" type="33"/>
		
		

		/* GET THE NAME */
        int start_pos = (parse.indexOf("(\"\", \"#0\"), \"")+13);
        int	end_pos = parse.indexOf("\") slotid");
           
		String NAME = parse.substring(start_pos, end_pos);
            

			
        /* GET THE ID */
        start_pos = (parse.indexOf("value Integer(")+14);
        end_pos = parse.indexOf(") end");
           
		String ID = parse.substring(start_pos, end_pos);
            
			
			
        /* COMPILE IT TO XML */
		String FinalXML = "<Packet id=\""+NAME+"\" type=\""+ID+"\"/>";
         System.out.println("! PACKET XML is  "+FinalXML);
         
        finalText += FinalXML+" ";

	}
	
}


Here is a test file if you wish to test it :
Code:
 trait const QName(PackageNamespace("", "#0"), "FAILURE") slotid 1 type QName(PackageNamespace("", "#0"), "int") value Integer(0) end
 trait const QName(PackageNamespace("", "#0"), "CREATE_SUCCESS") slotid 2 type QName(PackageNamespace("", "#0"), "int") value Integer(15) end
 trait const QName(PackageNamespace("", "#0"), "CREATE") slotid 3 type QName(PackageNamespace("", "#0"), "int") value Integer(33) end
Version 2:

Code:
package parser;

/* Create a file on C:/ named data.txt and push this inside :


<Packet id="FAILURE" type="0"/>
<Packet id="CREATE_SUCCESS" type="81"/>
<Packet id="CREATE" type="38"/>
<Packet id="PLAYERSHOOT" type="41"/>
<Packet id="MOVE" type="58"/>
<Packet id="PLAYERTEXT" type="87"/>
<Packet id="TEXT" type="93"/>
<Packet id="SHOOT2" type="31"/>
<Packet id="DAMAGE" type="24"/>
<Packet id="UPDATE" type="21"/>


and take a look at the result



*/

import java ****. BufferedReader; //Remove the spaces jackass
import java ****. FileReader;
import java ****. IOException;

public class XMLtoHPP {

public static String finalText = "";

public static void main(String[] agrs) throws IOException {

BufferedReader in = new BufferedReader(new FileReader("C:/data.txt"));

while (in.ready()) {
String s = in.readLine();
parse(s);
}
in.close();

System.out.println("{ " + finalText + " }");

}

public static void parse(String parse) {

/* References : */
// Initial : <Packet id="CREATE_SUCCESS" type="81"/>
// Final : CREATE_SUCCESS = 81,

// System.out.println(parse);

if (parse.contains("<Packet id=\"")) {
// System.out.println("Countains");
} else {
System.err.println("Error.");
System.err.println("Try to remove the first and the last line of the XML.");
}

/* GET THE NAME */
int start_pos = (parse.indexOf("<Packet id=\"") + 12);
int end_pos = parse.indexOf("\" type=");

String NAME = parse.substring(start_pos, end_pos);

/* GET THE ID */
start_pos = (parse.indexOf("type=\"") + 7);
end_pos = parse.indexOf("\"/>");

String ID = parse.substring(start_pos, end_pos);

/* COMPILE IT TO XML */

String FinalXML = NAME + " = " + ID + ", ";
// System.out.println("! PACKET XML is "+FinalXML);

finalText += FinalXML + " ";

}

}
#1 · edited 12y ago · 12y ago
QuickNick
QuickNick
it isn't much work to update it by hand, but i guess that speeds it up a little bit. thanks!
#2 · 12y ago
Trollaux
Trollaux
Pretty good for my skrub alde.
<3
#3 · 12y ago
LO
Lovroman
Nice, nice.
Good job!
#4 · 12y ago
Knorrex
Knorrex
Enumerate all the packet names or something similar, to convert obfuscated names to clear names, and you're set
#5 · 12y ago
CrazyJani
CrazyJani
Quote Originally Posted by ZBORNOX View Post
package games.flappybird; //Le flappybird
Dafuq is this doin' there?
#6 · 12y ago
Alde.
Alde.
Quote Originally Posted by CrazyJani View Post

Dafuq is this doin' there?
2lazy2change
#7 · 12y ago
CrazyJani
CrazyJani
Quote Originally Posted by ZBORNOX View Post
<Packet id="FAILURE" type="0"/>
What is type? I mean what does it do?
#8 · 12y ago
Alde.
Alde.
Quote Originally Posted by CrazyJani View Post

What is type? I mean what does it do?
RealmRelay uses packet.xml to get the packet ids and names.
The id is the name and the type is the ID.
Packets changes each build, so having to change the packets ids to make an updated proxy is long.
#9 · 12y ago
CrazyJani
CrazyJani
Quote Originally Posted by ZBORNOX View Post
Packets changes each build, so having to change the packets ids to make an updated proxy is long.
Yeah I knew it. But I had no idea how to update them. I'd hire Cryogen for that job, haha
#10 · 12y ago
CI
Cicada
Knock yourselves out.

http://pastebin.com/qNtnMPsp

Hope it helps.
#11 · 12y ago
Alde.
Alde.
Quote Originally Posted by Cicada View Post
Knock yourselves out.

http://pastebin.com/qNtnMPsp

Hope it helps.
WANNA FITE FAG0T???
#12 · 12y ago
Alde.
Alde.
Update 4.20 : XMLtoHPP.java
May help. I'm sorry but this code is really dirty and stupidly made.
The 420 blazism may have been the cause of this disorder.

 
XMLtoHPP.
package parser;

/* Create a file on C:/ named data.txt and push this inside :


<Packet id="FAILURE" type="0"/>
<Packet id="CREATE_SUCCESS" type="81"/>
<Packet id="CREATE" type="38"/>
<Packet id="PLAYERSHOOT" type="41"/>
<Packet id="MOVE" type="58"/>
<Packet id="PLAYERTEXT" type="87"/>
<Packet id="TEXT" type="93"/>
<Packet id="SHOOT2" type="31"/>
<Packet id="DAMAGE" type="24"/>
<Packet id="UPDATE" type="21"/>


and take a look at the result



*/

import java ****. BufferedReader; //Remove the spaces jackass
import java ****. FileReader;
import java ****. IOException;

public class XMLtoHPP {

public static String finalText = "";

public static void main(String[] agrs) throws IOException {

BufferedReader in = new BufferedReader(new FileReader("C:/data.txt"));

while (in.ready()) {
String s = in.readLine();
parse(s);
}
in.close();

System.out.println("{ " + finalText + " }");

}

public static void parse(String parse) {

/* References : */
// Initial : <Packet id="CREATE_SUCCESS" type="81"/>
// Final : CREATE_SUCCESS = 81,

// System.out.println(parse);

if (parse.contains("<Packet id=\"")) {
// System.out.println("Countains");
} else {
System.err.println("Error.");
System.err.println("Try to remove the first and the last line of the XML.");
}

/* GET THE NAME */
int start_pos = (parse.indexOf("<Packet id=\"") + 12);
int end_pos = parse.indexOf("\" type=");

String NAME = parse.substring(start_pos, end_pos);

/* GET THE ID */
start_pos = (parse.indexOf("type=\"") + 7);
end_pos = parse.indexOf("\"/>");

String ID = parse.substring(start_pos, end_pos);

/* COMPILE IT TO XML */

String FinalXML = NAME + " = " + ID + ", ";
// System.out.println("! PACKET XML is "+FinalXML);

finalText += FinalXML + " ";

}

}
#13 · 12y ago
Posts 1–13 of 13 · Page 1 of 1

Post a Reply

Similar Threads

  • Maple Story Java packet SenderBy wkdehf3458 in MapleStory Hack Coding/Source Code
    4Last post 13y ago
  • Python items.xml parser 1.0By runekri3 in Realm of the Mad God Hacks & Cheats
    41Last post 13y ago
  • Need Java BooksBy itz me_ in Programming Tutorial Requests
    1Last post 13y ago
  • Packets & Visual BasicBy BadBob in Hack Requests
    5Last post 20y ago
  • Sugestion--Post Saved packets (WR)By wardo1926 in General Game Hacking
    12Last post 20y ago

Tags for this Thread

#god#java#mad#parser#realm#xml