1
0
mirror of synced 2024-11-14 23:07:36 +01:00

add old terminal options back

This commit is contained in:
hackerd00mer ‭ 2021-08-26 08:40:30 +07:00
parent 38c02771bf
commit 70ed43161c

View File

@ -15,9 +15,9 @@
extern LPCSTR hookPort;
uintptr_t imageBasedxplus;
static unsigned char hasp_buffer[0xD40];
//static bool isFreePlay;
//static bool isEventMode2P;
//static bool isEventMode4P;
static bool isFreePlay;
static bool isEventMode2P;
static bool isEventMode4P;
const char *ipaddrdxplus;
/*
// Data for IC card, Force Feedback etc OFF.
@ -133,9 +133,9 @@ unsigned char dxpterminalPackage6_Free[139] = {
0x20, 0x00, 0x52, 0x0B, 0x08, 0x64, 0x10, 0xDE, 0x0F, 0x18, 0x05, 0x20,
0x00, 0x28, 0x00, 0x26, 0xB7, 0x89, 0xD0
};
/*
// FOR COIN ENTRY!
unsigned char terminalPackage1_Coin[75] = {
unsigned char dxpterminalPackage1_Coin[75] = {
0x01, 0x04, 0x47, 0x00, 0x12, 0x14, 0x0A, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x40, 0x00, 0x48, 0x00,
0x50, 0x00, 0x1A, 0x00, 0x2A, 0x12, 0x08, 0x0B, 0x12, 0x0C, 0x32, 0x37,
@ -145,7 +145,7 @@ unsigned char terminalPackage1_Coin[75] = {
0x06, 0x41, 0x0B
};
unsigned char terminalPackage2_Coin[135] = {
unsigned char dxpterminalPackage2_Coin[135] = {
0x01, 0x04, 0x83, 0x00, 0x12, 0x14, 0x0A, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x40, 0x00, 0x48, 0x00,
0x50, 0x00, 0x1A, 0x00, 0x2A, 0x12, 0x08, 0x39, 0x12, 0x0C, 0x32, 0x37,
@ -160,7 +160,7 @@ unsigned char terminalPackage2_Coin[135] = {
0xF1, 0x0D, 0xB2
};
unsigned char terminalPackage3_Coin[75] = {
unsigned char dxpterminalPackage3_Coin[75] = {
0x01, 0x04, 0x47, 0x00, 0x12, 0x14, 0x0A, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x40, 0x00, 0x48, 0x00,
0x50, 0x00, 0x1A, 0x00, 0x2A, 0x12, 0x08, 0x3A, 0x12, 0x0C, 0x32, 0x37,
@ -170,7 +170,7 @@ unsigned char terminalPackage3_Coin[75] = {
0x25, 0x31, 0x0D
};
unsigned char terminalPackage4_Coin[135] = {
unsigned char dxpterminalPackage4_Coin[135] = {
0x01, 0x04, 0x83, 0x00, 0x12, 0x14, 0x0A, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x40, 0x00, 0x48, 0x00,
0x50, 0x00, 0x1A, 0x00, 0x2A, 0x12, 0x08, 0x57, 0x12, 0x0C, 0x32, 0x37,
@ -185,7 +185,7 @@ unsigned char terminalPackage4_Coin[135] = {
0x8B, 0x15, 0xCB
};
unsigned char terminalPackage5_Coin[79] = {
unsigned char dxpterminalPackage5_Coin[79] = {
0x01, 0x04, 0x4B, 0x00, 0x12, 0x14, 0x0A, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x40, 0x00, 0x48, 0x00,
0x50, 0x00, 0x1A, 0x02, 0x5A, 0x00, 0x2A, 0x12, 0x08, 0x58, 0x12, 0x0C,
@ -195,7 +195,7 @@ unsigned char terminalPackage5_Coin[79] = {
0x00, 0x28, 0x00, 0x3E, 0xB1, 0xB7, 0x22
};
unsigned char terminalPackage6_Coin[139] = {
unsigned char dxpterminalPackage6_Coin[139] = {
0x01, 0x04, 0x87, 0x00, 0x12, 0x14, 0x0A, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x40, 0x00, 0x48, 0x00,
0x50, 0x00, 0x1A, 0x02, 0x5A, 0x00, 0x2A, 0x12, 0x08, 0x77, 0x12, 0x0C,
@ -212,7 +212,7 @@ unsigned char terminalPackage6_Coin[139] = {
//Event mode 2P
unsigned char terminalPackage1_Event4P[79] = {
unsigned char dxpterminalPackage1_Event4P[79] = {
0x01, 0x04, 0x44, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0xd1, 0x0b, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -221,7 +221,7 @@ unsigned char terminalPackage1_Event4P[79] = {
0xde, 0x0f, 0x18, 0x05, 0x20, 0x00, 0x28, 0x00, 0xc1, 0x96, 0xc9, 0x2e
};
unsigned char terminalPackage2_Event4P[139] = {
unsigned char dxpterminalPackage2_Event4P[139] = {
0x01, 0x04, 0x80, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0xd2, 0x0b, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -236,7 +236,7 @@ unsigned char terminalPackage2_Event4P[139] = {
};
unsigned char terminalPackage3_Event4P[79] = {
unsigned char dxpterminalPackage3_Event4P[79] = {
0x01, 0x04, 0x44, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0x8d, 0x0c, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -245,7 +245,7 @@ unsigned char terminalPackage3_Event4P[79] = {
0xde, 0x0f, 0x18, 0x05, 0x20, 0x00, 0x28, 0x00, 0x86, 0xb1, 0x27, 0x9e
};
unsigned char terminalPackage4_Event4P[139] = {
unsigned char dxpterminalPackage4_Event4P[139] = {
0x01, 0x04, 0x80, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0x8e, 0x0c, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -260,7 +260,7 @@ unsigned char terminalPackage4_Event4P[139] = {
};
unsigned char terminalPackage5_Event4P[79] = {
unsigned char dxpterminalPackage5_Event4P[79] = {
0x01, 0x04, 0x44, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0xc9, 0x0c, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -269,7 +269,7 @@ unsigned char terminalPackage5_Event4P[79] = {
0xde, 0x0f, 0x18, 0x05, 0x20, 0x00, 0x28, 0x00, 0x5d, 0x49, 0x01, 0x1e
};
unsigned char terminalPackage6_Event4P[139] = {
unsigned char dxpterminalPackage6_Event4P[139] = {
0x01, 0x04, 0x80, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0xca, 0x0c, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -285,7 +285,7 @@ unsigned char terminalPackage6_Event4P[139] = {
//Event mode 2P
unsigned char terminalPackage1_Event2P[79] = {
unsigned char dxpterminalPackage1_Event2P[79] = {
0x01, 0x04, 0x44, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0xfe, 0x0e, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -294,7 +294,7 @@ unsigned char terminalPackage1_Event2P[79] = {
0xde, 0x0f, 0x18, 0x05, 0x20, 0x00, 0x28, 0x00, 0xaf, 0xa1, 0x42, 0x3d
};
unsigned char terminalPackage2_Event2P[139] = {
unsigned char dxpterminalPackage2_Event2P[139] = {
0x01, 0x04, 0x80, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0xff, 0x0e, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -309,7 +309,7 @@ unsigned char terminalPackage2_Event2P[139] = {
};
unsigned char terminalPackage3_Event2P[79] = {
unsigned char dxpterminalPackage3_Event2P[79] = {
0x01, 0x04, 0x44, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0x80, 0x0f, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -318,7 +318,7 @@ unsigned char terminalPackage3_Event2P[79] = {
0xde, 0x0f, 0x18, 0x05, 0x20, 0x00, 0x28, 0x00, 0xa3, 0x94, 0x12, 0x9b
};
unsigned char terminalPackage4_Event2P[139] = {
unsigned char dxpterminalPackage4_Event2P[139] = {
0x01, 0x04, 0x80, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0x8d, 0x0f, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -333,7 +333,7 @@ unsigned char terminalPackage4_Event2P[139] = {
};
unsigned char terminalPackage5_Event2P[79] = {
unsigned char dxpterminalPackage5_Event2P[79] = {
0x01, 0x04, 0x44, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0x8e, 0x0f, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -342,7 +342,7 @@ unsigned char terminalPackage5_Event2P[79] = {
0xde, 0x0f, 0x18, 0x05, 0x20, 0x00, 0x28, 0x00, 0xa3, 0xc2, 0x27, 0x9c
};
unsigned char terminalPackage6_Event2P[139] = {
unsigned char dxpterminalPackage6_Event2P[139] = {
0x01, 0x04, 0x80, 0x00, 0x12, 0x0e, 0x0a, 0x00, 0x10, 0x04, 0x18, 0x00,
0x20, 0x00, 0x28, 0x00, 0x30, 0x00, 0x38, 0x00, 0x1a, 0x00, 0x2a, 0x13,
0x08, 0xf0, 0x0e, 0x12, 0x0c, 0x32, 0x37, 0x32, 0x32, 0x31, 0x31, 0x39,
@ -355,7 +355,7 @@ unsigned char terminalPackage6_Event2P[139] = {
0x03, 0x10, 0x01, 0x18, 0x00, 0x20, 0x00, 0x52, 0x0b, 0x08, 0x64, 0x10,
0xde, 0x0f, 0x18, 0x05, 0x20, 0x00, 0x28, 0x00, 0x97, 0xd5, 0x79, 0xa6
};
*/
#define HASP_STATUS_OK 0
unsigned int dxpHook_hasp_login(int feature_id, void* vendor_code, int hasp_handle) {
@ -1066,72 +1066,72 @@ static DWORD WINAPI SpamMulticast(LPVOID)
sizeof(dxpterminalPackage5_Free),
sizeof(dxpterminalPackage6_Free),
};
/*
const uint8_t* byteSequences_Event2P[] = {
terminalPackage1_Event2P,
terminalPackage2_Event2P,
terminalPackage3_Event2P,
terminalPackage4_Event2P,
terminalPackage5_Event2P,
terminalPackage6_Event2P,
dxpterminalPackage1_Event2P,
dxpterminalPackage2_Event2P,
dxpterminalPackage3_Event2P,
dxpterminalPackage4_Event2P,
dxpterminalPackage5_Event2P,
dxpterminalPackage6_Event2P,
};
const size_t byteSizes_Event2P[] = {
sizeof(terminalPackage1_Event2P),
sizeof(terminalPackage2_Event2P),
sizeof(terminalPackage3_Event2P),
sizeof(terminalPackage4_Event2P),
sizeof(terminalPackage5_Event2P),
sizeof(terminalPackage6_Event2P),
sizeof(dxpterminalPackage1_Event2P),
sizeof(dxpterminalPackage2_Event2P),
sizeof(dxpterminalPackage3_Event2P),
sizeof(dxpterminalPackage4_Event2P),
sizeof(dxpterminalPackage5_Event2P),
sizeof(dxpterminalPackage6_Event2P),
};
const uint8_t* byteSequences_Event4P[] = {
terminalPackage1_Event4P,
terminalPackage2_Event4P,
terminalPackage3_Event4P,
terminalPackage4_Event4P,
terminalPackage5_Event4P,
terminalPackage6_Event4P,
dxpterminalPackage1_Event4P,
dxpterminalPackage2_Event4P,
dxpterminalPackage3_Event4P,
dxpterminalPackage4_Event4P,
dxpterminalPackage5_Event4P,
dxpterminalPackage6_Event4P,
};
const size_t byteSizes_Event4P[] = {
sizeof(terminalPackage1_Event4P),
sizeof(terminalPackage2_Event4P),
sizeof(terminalPackage3_Event4P),
sizeof(terminalPackage4_Event4P),
sizeof(terminalPackage5_Event4P),
sizeof(terminalPackage6_Event4P),
sizeof(dxpterminalPackage1_Event4P),
sizeof(dxpterminalPackage2_Event4P),
sizeof(dxpterminalPackage3_Event4P),
sizeof(dxpterminalPackage4_Event4P),
sizeof(dxpterminalPackage5_Event4P),
sizeof(dxpterminalPackage6_Event4P),
};
const uint8_t* byteSequences_Coin[] = {
terminalPackage1_Coin,
terminalPackage2_Coin,
terminalPackage3_Coin,
terminalPackage4_Coin,
terminalPackage5_Coin,
terminalPackage6_Coin,
dxpterminalPackage1_Coin,
dxpterminalPackage2_Coin,
dxpterminalPackage3_Coin,
dxpterminalPackage4_Coin,
dxpterminalPackage5_Coin,
dxpterminalPackage6_Coin,
};
const size_t byteSizes_Coin[] = {
sizeof(terminalPackage1_Coin),
sizeof(terminalPackage2_Coin),
sizeof(terminalPackage3_Coin),
sizeof(terminalPackage4_Coin),
sizeof(terminalPackage5_Coin),
sizeof(terminalPackage6_Coin),
sizeof(dxpterminalPackage1_Coin),
sizeof(dxpterminalPackage2_Coin),
sizeof(dxpterminalPackage3_Coin),
sizeof(dxpterminalPackage4_Coin),
sizeof(dxpterminalPackage5_Coin),
sizeof(dxpterminalPackage6_Coin),
};
*/
sockaddr_in toAddr = { 0 };
toAddr.sin_family = AF_INET;
toAddr.sin_addr.s_addr = inet_addr("225.0.0.1");
toAddr.sin_port = htons(50765);
/*
isFreePlay = ToBool(config["General"]["FreePlay"]);
isEventMode2P = ToBool(config["TerminalEmuConfig"]["2P Event Mode"]);
isEventMode4P = ToBool(config["TerminalEmuConfig"]["4P Event Mode"]);
*/
/*
if (isFreePlay)
{
if (isEventMode2P) {
@ -1161,12 +1161,6 @@ static DWORD WINAPI SpamMulticast(LPVOID)
{
sendto(sock, (const char*)byteSequences_Coin[i], byteSizes_Coin[i], 0, (sockaddr*)&toAddr, sizeof(toAddr));
Sleep(8);
}*/
while (true) for (int i = 0; i < _countof(byteSequences_Free); i++)
{
sendto(sock, (const char*)byteSequences_Free[i], byteSizes_Free[i], 0, (sockaddr*)&toAddr, sizeof(toAddr));
Sleep(8);
}
}