the Rainbow Networks
+++eXy FFA
Map: q3tourney3
Players: 2 / 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:  150 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:  159 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: kontol
New Today: 0
New Yesterday: 0
Overall: 355

People Online:
Members: 0
Visitors: 42
Total: 42
Who Is Where:
 Visitors:
01: Maps
02: Home
03: Rainbow Media
04: Maps
05: The golden pot
06: The golden pot
07: Home
08: The golden pot
09: The golden pot
10: Maps
11: The golden pot
12: Home
13: The golden pot
14: Maps
15: The golden pot
16: Maps
17: Maps
18: Home
19: The golden pot
20: Maps
21: The golden pot
22: Maps
23: The golden pot
24: Home
25: Maps
26: Home
27: The golden pot
28: The golden pot
29: The golden pot
30: The golden pot
31: Maps
32: The golden pot
33: The golden pot
34: The golden pot
35: The golden pot
36: Shoutblock
37: The golden pot
38: The golden pot
39: The golden pot
40: My Account
41: The golden pot
42: 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