the Rainbow Networks
+++eXy FFA
Map: q3tourney3
Players: 3 / 18
The golden pot › RAINBOW NETWORKS › Tech & Support › UDP socket plugin for firefox/mozilla
UDP socket plugin for firefox/mozilla
Something wrong with our servers or your system?
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexTech & Support
View previous topic :: View next topic  
Author Message
jackthompson
Admin
Admin


Joined: Aug 15, 2007
Posts: 1302
Location: Here

PostPosted: Thu Sep 02, 2010 5:13 am    Post subject: UDP socket plugin for firefox/mozilla Reply with quote

this is a preview... i'll clean it up and make a release this weekend on plugins.pwnoogle.com ...

it is only the linux version of the plugin... the windows port will also be available until the weekend

It is a firefox/mozilla plugin that extends the JavaScipt API with 4 functions to open/read/write/close UDP sockets. Binary data is percent-encoded

it has to be installed like the flashplayer plugin (in plugins/)

here is what a simple q3a rcon in javascript would look like using this plugin

Code::
<html>
<head>
<title>plugin test</title>
</head>
<body>
<embed id="udp_socket_plugin" type="application/x-udp-socket-plugin" height="0" width="0">
<script type="text/javascript">
//<![CDATA[

function rcon (ip, port, command)
{
  var udp_socket = document.getElementById('udp_socket_plugin');

  udp_socket.open (ip, port);

  // because of JavaScript binary data must be percent-encoded
  udp_socket.write ('%ff%ff%ff%ff' + command);

  var s = udp_socket.read ();  
  udp_socket.close ();

  // strip 4 bytes header (also percent-encoded)
  s = unescape (s.substring (12));

  for (var i = 0; i < s.length; i++)
    {
      s = s.replace ('\\', '<br>');
      s = s.replace ('\\', '=');
    }
  document.getElementById ('udp_socket_plugin_output').innerHTML = s;
}

//]]>
</script>

<input type="button" value="getstatus" onclick="javascript:rcon('d5.ath.cx', '27965', 'getstatus')">
<div id="udp_socket_plugin_output" style="height:400px">'
</div>

</body>
</html>

the code of the plugin is in C++ and based on the npruntime sample... it will need more cleaning... and eventually be ported to C..



udpsocketplugin-preview.tar.gz
 Description:
 Filename:  udpsocketplugin-preview.tar.gz
 Filesize:  173.1 KB
 Downloaded:  139 Time(s)


Last edited by jackthompson on Fri Sep 03, 2010 6:27 am; edited 1 time in total
Back to top
View user's profile
Falkland
Übergod
Übergod


Joined: Aug 01, 2008
Posts: 922
Location: Nowhere

PostPosted: Thu Sep 02, 2010 8:49 pm    Post subject: Re: UDP socket plugin for firefox/mozilla Reply with quote

Really interesting ... could it be used also for interfacing to a server and eventually joining it through the web interface , like in QL ?

BTW , I tried the page d5.ath.cx and it shows the server's phpinfo page ... dunno if this could be harmful or not
Back to top
View user's profile
jackthompson
Admin
Admin


Joined: Aug 15, 2007
Posts: 1302
Location: Here

PostPosted: Fri Sep 03, 2010 6:20 am    Post subject: Re: UDP socket plugin for firefox/mozilla Reply with quote

Falkland wrote:
Really interesting ... could it be used also for interfacing to a server and eventually joining it through the web interface , like in QL ?

BTW , I tried the page d5.ath.cx and it shows the server's phpinfo page ... dunno if this could be harmful or not

i already have such a plugin... i call it launcher or whatever :D it's based on the arenalive plugin which again was based on glugin (a plugin showing opengl stuff) which again was based on a mozilla example.. i took that example as a guide then and cleaned it harder..

i'm not sure if i want to merge it into the udp plugin since i want to keep that one generic as possible... and because of security stuff... the path of the game is hardcoded but still... it could be replaced with a file dialog..

the cmdline options of the game are set in the embed tag or can be set using a form... very much like QL... but it does not download and install a/the game... only launch it with options

the code is also very small and a example index.html is included



browser_plugin.tar.gz
 Description:
 Filename:  browser_plugin.tar.gz
 Filesize:  36.77 KB
 Downloaded:  152 Time(s)
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum Index -> Tech & Support All times are GMT + 1 Hour
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Welcome Anonymous


Membership:
Latest: Evilemerold
New Today: 0
New Yesterday: 0
Overall: 354

People Online:
Members: 0
Visitors: 20
Total: 20
Who Is Where:
 Visitors:
01: The golden pot
02: The golden pot
03: The golden pot
04: The golden pot
05: The golden pot
06: The golden pot
07: The golden pot
08: The golden pot
09: The golden pot
10: The golden pot
11: My Account
12: The golden pot
13: Rainbow Media
14: The golden pot
15: The golden pot
16: The golden pot
17: The golden pot
18: The golden pot
19: Rainbow Media
20: The golden pot

Staff Online:

No staff members are online!

The Rainbow Networks website is hosted by JockeTF and Soder on furver.se.

The Rainbow Networks
Interactive software released under GNU GPL, Code Credits, Privacy Policy
Azul theme and related images designed by Jamin