With this release comes good news and bad news.
The bad news is my prehook system doesn't work, so I'm going to have to find a new way of adding IP hooks. I've looked at several alternatives and found that I could quite easily make a cross-platform hook for Linux/Mac, but Windows doesn't like letting anyone do any low-ish level network hacks.
The good news is that PEW support has been added, which is a pretty big thing.
I've actually fixed the multiple server hook bug this time - connections now go to where they're meant to go.
I've also done a little more work on the GUI, adding the ability to actually remove port hooks and plugins.
It also no longer saves which hooks you were using. Now that Workspaces are implemented, it no longer needs to.
I'll update the Wiki with some documentation on Workspace files since to load plugins you have to edit the Workspace file via text editor.
I'd also like to point out that now Workspace files have been implemented, BPE is much more friendly towards having complete game hacks released on it since all an end-user needs to do to use a properly set up plugin-based hack is double click a Workspace file.
Feel free to spread this around.
People should use this.
DOWNLOAD
Changelog:
*BPE Pre-Alpha V1.2 (PEPAPI V1.1) (PEWVer 1.0)
- added PEW/Workspace support
- added "resetWorkspace", "hookServer", "hookPort" and "loadPlugin" Workspace commands
- added save & load workspace buttons
- save function saves server hooks and plugin hooks but not plugin configuration
- GUI improvements
- added ability to unload plugins via "Plugin Options" menu
- added ability to unhook ports via "Port Options" menu
- fixed bug where BPE would sometimes not close properly and hang in memory
- BPE now removes server hooks on close, use workspaces to save them
- made BPE the default file opener for .pew files (secretly done in V1.1)
- fixed bug where if more than one server was hooked all connections were routed to the first server in the list
- cleaned up shit tons of code
Showing posts with label hook. Show all posts
Showing posts with label hook. Show all posts
Tuesday, January 29, 2013
Monday, October 8, 2012
BPE Plugin Writing Tutorial #1 (Writing your first plugin)
So, I thought it was about damn time I wrote a tutorial on writing plugins for BPE (Mostly because currently I'm the only person who knows how).
Firstly, I've been updating the Wiki, so hopefully between this tutorial and the Wiki, there should be enough information for people to start writing plugins.
and now the tutorial:
Writing your first plugin.
So, we're gonna make a nice, simple plugin that simply outputs everything happening on the servers/ports being listened to.
It'll do the following:
Properly set up it's window
Output all sent/recieved packets
Output when connections are opened/closed
Now, let me explain a little about the hook system BPE uses. there are two kinds of hooks:
Hooks called by BPE, and
Hooks called by the plugin.
Hooks called by BPE are utilized by creating a public function in the document class of the plugin.
eg:
That above code would be called every time a packet is sent by the client. the variable "packet" contains the payload (data) from the packet in the form of a ByteArray. socketID is an integer containing the ID of the socket. The function returns the unmodified packet, so no modification is made.
Hooks called by the plugin are utilized by creating a public Function variable in the document class of the plugin, and then calling that variable/Function when you need to.
eg:
That above code (when someFunction is called) will scale the size of the window so that the stage is 550 pixels wide and 400 pixels high, then set the plugins window title to say "Debug".
Also note that all used hooks must be specified in the .pep file that goes with the plugin (more on that later, though).
Anyways, I hope that's enough explanation for understanding the hooking system for now. let's get on to making the actual plugin!
I'm going to assume you know your way around Flash and know a little AS3 at this point.
So, create a new AS3 project and a document class called "BPEDebugPlugin".
now, we're gonna be using ByteArray's (for the sent and received data) and TextFields (for the output), so go ahead and add these lines to the includes:
Now, we're gonna need to declare a couple variables in the class.
Firstly, since we want to set the window size and title, we want to use the updateWindow hook, so we need to add a Function variable with the name updateWindow.
Secondly, we want a TextField that we can write our outputted data to.
so, add these lines to your class variable declarations
we're gonna make use of the finishPluginSetup hook. this simple hook function is called after your plugins hooks have been set up and your plugin has been added to the stage. it basically tells you it is now safe to use hooks and access the stage.
Chuck this code right after the end of your constructor function:
As stated before, this function will be called once, when BPE has added it to the stage and set up all it's hooks. it calls the updateWindow hook and changes the window size and label. it will then set up the output TextField for use.
Now, let's get to the actually useful hooks. We'll start with the send and receive hooks, since they're super-similar, and quite simple.
These functions will be called by BPE every time a packet is sent by the client or received by the client. packet is the ByteArray containing the data payload of the packet, and socketID is the ID number for the socket. We'll output the data being sent in the packet.
This is probably a good time to introduce you to BPE's socket ID system. each socket that connects to BPE is given an ID to make them easy to keep track of.
The first socket to connect is given the ID 0
the second 1
the third 2
ect.
The functions then output the sent/recieved data along with the socket ID.
The ByteArray returned by these functions is then run through any remaining plugins and either sent to the client or server depending on whether the packet is being received or sent.
Since we're returning the same, unmodified ByteArray that was the input of the function, the packet is left untouched. if you return an empty ByteArray, the packet is dropped.
Onto the socketOpen and socketClose hooks.
The socketOpenHook is run every time a socket connects to BPE. it gives you the new socket's ID, the address it's attempting to connect to and the port on which it's attempting to connect to. We'll output the address and port on the server it's attempting to connect to.
Next is the socketCloseHook.
The socketCloseHook is called when the server disconnects the client. The Boolean closeSocket tells you whether BPE plans on disconnecting the client. if true, the socket is to be disconnected, if false, the socket connected to the client will stay connected. We'll return the closeSocket value given to us to let the other plugins or BPE decide what to do with the socket connected to the client.
Now, compile that sucker and we're up to creating the .pep file to load our plugin.
PEP files are like an external header for the plugin. it tells BPE everything it needs to know to run your plugin.
I created a simple little tool making it easy to generate the .pep file for your plugin. you can get it here or on the downloads page.
Open the PEP Builder up (do it in your browser if you have to).
For plugin name, type "BPEDebug".
For SWF Filename, write the name of your SWF (mine is "BPEDebug.swf")
and we need to tick the box next to each hook we used
tick the box next to hookUpdateWindow, hookFinishPluginSetup, hookRecievePacket, hookSendPacket, hookSocketOpen and hookSocketClose.
Once you've done that, click the "Save PEP File" button, and save it to the same location as your plugin SWF.
You're done!
Load your plugin with BPE, hook a server and port (web servers are the easiest for testing), and if it works, give yourself a pat on the back.
If it doesn't work, try again or leave a comment.
Here's a link to my finished source.
Firstly, I've been updating the Wiki, so hopefully between this tutorial and the Wiki, there should be enough information for people to start writing plugins.
and now the tutorial:
Writing your first plugin.
So, we're gonna make a nice, simple plugin that simply outputs everything happening on the servers/ports being listened to.
It'll do the following:
Properly set up it's window
Output all sent/recieved packets
Output when connections are opened/closed
Now, let me explain a little about the hook system BPE uses. there are two kinds of hooks:
Hooks called by BPE, and
Hooks called by the plugin.
Hooks called by BPE are utilized by creating a public function in the document class of the plugin.
eg:
public function sendPacketHook(packet:ByteArray,socketID:int):ByteArray
{
output.appendText("["+socketID+"] Sent:"+packet+"\n")
return packet;
}
That above code would be called every time a packet is sent by the client. the variable "packet" contains the payload (data) from the packet in the form of a ByteArray. socketID is an integer containing the ID of the socket. The function returns the unmodified packet, so no modification is made.
Hooks called by the plugin are utilized by creating a public Function variable in the document class of the plugin, and then calling that variable/Function when you need to.
eg:
public var updateWindow:Function;
public function someFunction():void
{
updateWindow(550,400,"Debug"); as
return;
}
That above code (when someFunction is called) will scale the size of the window so that the stage is 550 pixels wide and 400 pixels high, then set the plugins window title to say "Debug".
Also note that all used hooks must be specified in the .pep file that goes with the plugin (more on that later, though).
Anyways, I hope that's enough explanation for understanding the hooking system for now. let's get on to making the actual plugin!
I'm going to assume you know your way around Flash and know a little AS3 at this point.
So, create a new AS3 project and a document class called "BPEDebugPlugin".
now, we're gonna be using ByteArray's (for the sent and received data) and TextFields (for the output), so go ahead and add these lines to the includes:
import flash.text.TextField;
import flash.utils.ByteArray;
Now, we're gonna need to declare a couple variables in the class.
Firstly, since we want to set the window size and title, we want to use the updateWindow hook, so we need to add a Function variable with the name updateWindow.
Secondly, we want a TextField that we can write our outputted data to.
so, add these lines to your class variable declarations
public var updateWindow:Function;
private var output:TextField = new TextField();
we're gonna make use of the finishPluginSetup hook. this simple hook function is called after your plugins hooks have been set up and your plugin has been added to the stage. it basically tells you it is now safe to use hooks and access the stage.
Chuck this code right after the end of your constructor function:
public function finishPluginSetup()
{
updateWindow(550,400,"Debug");
output.x = 20;
output.y = 20;
output.width = 510;
output.height = 360;
output.background = true;
output.backgroundColor = 0xAAAAAA;
output.text = "Output\n";
this.addChild(output);
}
As stated before, this function will be called once, when BPE has added it to the stage and set up all it's hooks. it calls the updateWindow hook and changes the window size and label. it will then set up the output TextField for use.
Now, let's get to the actually useful hooks. We'll start with the send and receive hooks, since they're super-similar, and quite simple.
public function recievePacketHook(packet:ByteArray,socketID:int):ByteArray
{
output.appendText("["+socketID+"] Recieved:"+packet+"\n")
return packet;
}
public function sendPacketHook(packet:ByteArray,socketID:int):ByteArray
{
output.appendText("["+socketID+"] Sent:"+packet+"\n")
return packet;
}
These functions will be called by BPE every time a packet is sent by the client or received by the client. packet is the ByteArray containing the data payload of the packet, and socketID is the ID number for the socket. We'll output the data being sent in the packet.
This is probably a good time to introduce you to BPE's socket ID system. each socket that connects to BPE is given an ID to make them easy to keep track of.
The first socket to connect is given the ID 0
the second 1
the third 2
ect.
The functions then output the sent/recieved data along with the socket ID.
The ByteArray returned by these functions is then run through any remaining plugins and either sent to the client or server depending on whether the packet is being received or sent.
Since we're returning the same, unmodified ByteArray that was the input of the function, the packet is left untouched. if you return an empty ByteArray, the packet is dropped.
Onto the socketOpen and socketClose hooks.
public function socketOpenHook(socketID:int,address:String,port:int):void
{
output.appendText("["+socketID+"] Connected to:"+address+":"+port+"\n")
return;
}
The socketOpenHook is run every time a socket connects to BPE. it gives you the new socket's ID, the address it's attempting to connect to and the port on which it's attempting to connect to. We'll output the address and port on the server it's attempting to connect to.
Next is the socketCloseHook.
public function socketCloseHook(socketID:int,closeSocket:Boolean):Boolean
{
output.appendText("["+socketID+"] Disconnected, "+closeSocket+"\n")
return closeSocket;
}
The socketCloseHook is called when the server disconnects the client. The Boolean closeSocket tells you whether BPE plans on disconnecting the client. if true, the socket is to be disconnected, if false, the socket connected to the client will stay connected. We'll return the closeSocket value given to us to let the other plugins or BPE decide what to do with the socket connected to the client.
Now, compile that sucker and we're up to creating the .pep file to load our plugin.
PEP files are like an external header for the plugin. it tells BPE everything it needs to know to run your plugin.
I created a simple little tool making it easy to generate the .pep file for your plugin. you can get it here or on the downloads page.
Open the PEP Builder up (do it in your browser if you have to).
For plugin name, type "BPEDebug".
For SWF Filename, write the name of your SWF (mine is "BPEDebug.swf")
and we need to tick the box next to each hook we used
tick the box next to hookUpdateWindow, hookFinishPluginSetup, hookRecievePacket, hookSendPacket, hookSocketOpen and hookSocketClose.
Once you've done that, click the "Save PEP File" button, and save it to the same location as your plugin SWF.
You're done!
Load your plugin with BPE, hook a server and port (web servers are the easiest for testing), and if it works, give yourself a pat on the back.
If it doesn't work, try again or leave a comment.
Here's a link to my finished source.
Friday, September 14, 2012
BPE Pre-Alpha V1.1
It's finally here!
BPE Pre-Alpha V1.1 and HTTPlugin are done.
I'm tired from programming and testing, so I'm not gonna write much.
Read the readme if you want more.
Find HTTPlugin and the latest version of BPE on the Downloads page.
get BPE Pre-Alpha V1.1 here.
I'm gonna spend any upcoming spare time to write tutorials and update the wiki.
Changelog:
- changed updateWindowHook
- added socket ID system
- updated sendPacketHook
- updated recievePacketHook
- added forceRecieveHook
- added forceSendHook
- added forceCloseHook
- added socketOpenHook
- added socketCloseHook
- removed PEPAPI V1 support, mostly
- attempted to make work on Linux and Mac (untested)
- GUI improvements
- added "Server Options" window
- added "Plugin Options" window (incomplete)
- added "Port Options" window (incomplete)
- fixed bugs
- possibly fixed the "multiple hooked servers" bug? (not sure how, might be black magic. the bug should theoretically still be there, but tests indicate it's fixed)
- fixed problem with data not being sent when a connection was still being fowarded
- misc other bugs
If I get a Mac tester, I'll try and get Linux and Mac support into the next release.
BPE Pre-Alpha V1.1 and HTTPlugin are done.
I'm tired from programming and testing, so I'm not gonna write much.
Read the readme if you want more.
Find HTTPlugin and the latest version of BPE on the Downloads page.
get BPE Pre-Alpha V1.1 here.
I'm gonna spend any upcoming spare time to write tutorials and update the wiki.
Changelog:
- changed updateWindowHook
- added socket ID system
- updated sendPacketHook
- updated recievePacketHook
- added forceRecieveHook
- added forceSendHook
- added forceCloseHook
- added socketOpenHook
- added socketCloseHook
- removed PEPAPI V1 support, mostly
- attempted to make work on Linux and Mac (untested)
- GUI improvements
- added "Server Options" window
- added "Plugin Options" window (incomplete)
- added "Port Options" window (incomplete)
- fixed bugs
- possibly fixed the "multiple hooked servers" bug? (not sure how, might be black magic. the bug should theoretically still be there, but tests indicate it's fixed)
- fixed problem with data not being sent when a connection was still being fowarded
- misc other bugs
If I get a Mac tester, I'll try and get Linux and Mac support into the next release.
Tuesday, July 17, 2012
BPE Pre-Alpha V1.0
Here it finally is!
The first public release of my packet editor!
Currently, it comes with no plugins and is windows only, so it will only be useful to those who can program in AS3.
I'm going to be posting tutorials on using and writing plugins for it in the near future, so stay tuned!
In the meantime, you can download the source for a simple Stick Arena Dimensions plugin I made and edit that to work for whatever uses you have.
To use the plugin, hook these servers:
ballistick1.xgenstudios.com
ballistick2.xgenstudios.com
ballistick3.xgenstudios.com
ballistick4.xgenstudios.com
ballistick5.xgenstudios.com
ballistick6.xgenstudios.com
ballistick7.xgenstudios.com
ballistick8.xgenstudios.com
ballistick9.xgenstudios.com
Or add this to your hosts file:
127.0.0.2 ballistick1.xgenstudios.com #CoreHook IP 67.19.138.234
127.0.0.2 ballistick2.xgenstudios.com #CoreHook IP 67.19.138.235
127.0.0.2 ballistick3.xgenstudios.com #CoreHook IP 67.19.138.236
127.0.0.2 ballistick4.xgenstudios.com #CoreHook IP 74.86.43.8
127.0.0.2 ballistick5.xgenstudios.com #CoreHook IP 74.86.43.9
127.0.0.2 ballistick6.xgenstudios.com #CoreHook IP 74.86.43.10
127.0.0.2 ballistick7.xgenstudios.com #CoreHook IP 74.86.3.220
127.0.0.2 ballistick8.xgenstudios.com #CoreHook IP 74.86.3.221
127.0.0.2 ballistick9.xgenstudios.com #CoreHook IP 74.86.3.222
And hook port 1138.
Currently, you have to manually remove server hooks by editing your hosts file (C:\windows\system32\drivers\etc\hosts).
Anyway, here's the download link for the packet editor.
Current features:
Working plugin system
Working hooking system
Loads previous server hooks when it opens
Probably undetected by most/all current games and anti-cheat systems
Current known bugs:
Too many to list...
Also: Android has been added to the list of OS's I plan to develop my packet editor for. Support will probably be added for it during Beta.
Linux (and possibly Mac) support will hopefully be added in the next few releases.
I've also updated the downloads page with BPE and the plugin.
The first public release of my packet editor!
Currently, it comes with no plugins and is windows only, so it will only be useful to those who can program in AS3.
I'm going to be posting tutorials on using and writing plugins for it in the near future, so stay tuned!
In the meantime, you can download the source for a simple Stick Arena Dimensions plugin I made and edit that to work for whatever uses you have.
To use the plugin, hook these servers:
ballistick1.xgenstudios.com
ballistick2.xgenstudios.com
ballistick3.xgenstudios.com
ballistick4.xgenstudios.com
ballistick5.xgenstudios.com
ballistick6.xgenstudios.com
ballistick7.xgenstudios.com
ballistick8.xgenstudios.com
ballistick9.xgenstudios.com
Or add this to your hosts file:
127.0.0.2 ballistick1.xgenstudios.com #CoreHook IP 67.19.138.234
127.0.0.2 ballistick2.xgenstudios.com #CoreHook IP 67.19.138.235
127.0.0.2 ballistick3.xgenstudios.com #CoreHook IP 67.19.138.236
127.0.0.2 ballistick4.xgenstudios.com #CoreHook IP 74.86.43.8
127.0.0.2 ballistick5.xgenstudios.com #CoreHook IP 74.86.43.9
127.0.0.2 ballistick6.xgenstudios.com #CoreHook IP 74.86.43.10
127.0.0.2 ballistick7.xgenstudios.com #CoreHook IP 74.86.3.220
127.0.0.2 ballistick8.xgenstudios.com #CoreHook IP 74.86.3.221
127.0.0.2 ballistick9.xgenstudios.com #CoreHook IP 74.86.3.222
And hook port 1138.
Currently, you have to manually remove server hooks by editing your hosts file (C:\windows\system32\drivers\etc\hosts).
Anyway, here's the download link for the packet editor.
Current features:
Working plugin system
Working hooking system
Loads previous server hooks when it opens
Probably undetected by most/all current games and anti-cheat systems
Current known bugs:
Too many to list...
Also: Android has been added to the list of OS's I plan to develop my packet editor for. Support will probably be added for it during Beta.
Linux (and possibly Mac) support will hopefully be added in the next few releases.
I've also updated the downloads page with BPE and the plugin.
Subscribe to:
Posts (Atom)