Fandom

XBox360 Homebrew Development Wiki

Network Encryption

20pages on
this wiki
Add New Page
Talk6 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

If you want to add network access to your homebrew application, you have to bypass the network encryption by creating an unencrypted socket. Thanks to Jefff from Team XeDEV!

CodeEdit

DWORD dwStatus = XNetGetEthernetLinkStatus();

int m_bIsOnline = ( dwStatus & XNET_ETHERNET_LINK_ACTIVE ) != 0;

if( !m_bIsOnline )

  printf("NO ETHERNET LINK ACTIVE\n");

XNetStartupParams xnsp;
memset(&xnsp, 0, sizeof(xnsp));
xnsp.cfgSizeOfStruct = sizeof(XNetStartupParams);
xnsp.cfgFlags = XNET_STARTUP_BYPASS_SECURITY;

INT iResult = XNetStartup( &xnsp );

if( iResult != NO_ERROR )

  printf("XNETSTARTUP ERROR\n");

WSADATA WsaData;
iResult = WSAStartup( MAKEWORD( 2, 2 ), &WsaData );
if( iResult != NO_ERROR )

  printf("WSASTARTUP ERROR\n");

SOCKET server;

sockaddr_in local;
local.sin_family=AF_INET;
local.sin_addr.s_addr=INADDR_ANY;
local.sin_port=htons((u_short)1337);

server=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);

if(server==INVALID_SOCKET)
{

  printf( "INVALID SOCKET!\n");

}

// after setting these undocumented flags on a socket they should then run unencrypted
BOOL bBroadcast = TRUE;

if( setsockopt(server, SOL_SOCKET, 0x5802, (PCSTR)&bBroadcast, sizeof(BOOL) ) != 0 )//PATCHED!
{

  printf( "Failed to set socket to 5802, error\n");

}

if( setsockopt(server, SOL_SOCKET, 0x5801, (PCSTR)&bBroadcast, sizeof(BOOL) ) != 0 )//PATCHED!
{

  printf( "Failed to set socket to 5801, error\n");

}

//Socket is now unencrypted, use it as you usually would.
// encryption setup run .bat**

HiEdit

Also on Fandom

Random Wiki