2

许多流行的网页游戏都是用 Flash 创建的。我相当肯定他们也利用 websockets 来完成诸如聊天和持续更新之类的任务。有问题的游戏是亚特兰蒂斯之龙,虽然我真的希望能够对他们所有人都这样做。该游戏同时使用 XMLHTTPRequests 进行操作,我相信我在此处的 flash 参数中找到的 websocket:

    <object id="castlemania_swf" width="760" height="800" type="application/x-shockwave-flash" data="https://s3-external-1.amazonaws.com/castlemania-production/flash/game/current/preloader.swf?cachebreaker=23423423429">
<param name="allowScriptAccess" value="always">
<param name="allowFullScreen" value="true">
<param name="wmode" value="opaque">
<param name="flashvars" value="session_id=fjdkfjal2j3j2lkj232&locale=en&api_server=http://realm193.c10.castle.wonderhill.com/api&pub_server=c10.castle.wonderhill.com&pub_port=7000&user_id=89234787492&user_hash=242343234242342432342343424232&user_time=1344028407&dragon_heart=234343242432432432432342432&platform=yahoofb&subnetwork=&s3_server=https://s3-external-1.amazonaws.com/castlemania-production&s3_swf_prefix=/flash/game/current&assets_server=https://assets-castle.wonderhill.com&assets_prefix=/flash/gam...ode_is_cdn=false&preloader_cachebreaker=243234432423&primary_ui_cachebreaker=23432432&secondary_ui_cachebreaker=24322432423&i18n_cachebreaker=2432423342432&manifest_cachebreaker=24342423423&building_cachebreaker=23423423342&sound_cachebreaker=2432423342423&client_cachebreaker=2432423342423&lazy_loaded_swf_cachebreaker=2432432423&map_bin_cachebreaker=24342323&assets_cachebreaker=2432432423_2423423423.24323423&statics_translations_cachebreaker=20130305_213355.49364792&statics_manifests_cachebreaker=243223423234_213429.42776785">

所以你不必在这里搜索是我感兴趣的参数

    api_server=http://realm193.c10.castle.wonderhill.com/api&pub_server=c10.castle.wonderhill.com&pub_port=7000

在尝试使用 Chrome 并且没有看到浏览器开发人员工具嗅探 WebSocket 并覆盖 WebSocket 的证据后,我正在使用greasemonkey 和 firefox

    (function(){
var proxied=window.WebSocket.prototype.send;
window.WebSocket.prototype.send=function(){
    alert(arguments[0]);
    return proxied.apply(this,[].slice.call(arguments));
};
    })();

尽管它确实适用于所有基于 html5 的应用程序,但仍然没有运气。闪存是否绕过浏览器,这就是 Chrome/Firefox/Javascript 不接收 websocket 调用的原因。 有没有办法使用 flash 使用的 websockets? 我的目标不仅是嗅探流量,而且以有意义的方式使用它,因此仅查看流量是不够的。谢谢你的帮助!!

(我知道 websockets 的一个流行答案是使用 Chrome,但在这种情况下,它根本不适用于默认的 Chrome,谢谢!)

4

0 回答 0