1

我制作了一个可在 Google Chrome 扩展程序中运行的脚本。我连忙解释道:有一款网游叫《龙界》。脚本所做的是计算你必须向对手射击的力量。好的,我试图在外部服务器上容纳我的脚本,并且显然已加载但未执行(“加载”)。我认为错误可能出在代码中(我使用了视频游戏的 javascript 来创建我的脚本)。代理原始代码、json 和调用外部脚本的 js:

Codeviewer 中的主要 Javascript

清单.json

{
  "name": "DragonBound Aimbot 2.0",
  "version": "2.0.0",
  "manifest_version": 2,
  "description": "DragonBound Aimbot Hack - HTML5",
   "browser_action": {
    "default_popup": "popup.html",
    "default_icon": "icon.png"
  },
   "permissions": ["tabs", "notifications", "http://*.dropbox.com/u/91461506/*", "https://*.dropbox.com/u/91461506/*"],
   "background": { "page": "background.html", "persistent" : false },
"content_scripts": [
    {
      "matches": ["http://*.dragonbound.net/*","http://*.dropbox.com/u/91461506/*"],
      "js": ["jquery2.js","DragonBoundAimbot.js"],
      "run_at": "document_end"
    }
  ],
  "icons": {"16": "16.png", "48": "48.png", "128": "128.png"},
  "web_accessible_resources": [
    "ranks/*","48.png"
  ],
  "homepage_url" : "http://www.dropbox.com"
}

-Code 调用外部脚本:

chrome.extension.sendRequest({type:"init"},function(response){

    if(response.ingame){
        chrome.extension.sendRequest({id:"loading",type:"notification2",text:["Loading","Loading scripts from dropbox.com..."]}, function(response) {});
        chrome.extension.sendRequest({type:"loadscript",url:'http://dl.dropbox.com/u/91461506/prueba2.js',cache:false}, function(response) {
            if(response.type == 1){
                eval(response.scriptcontent);

            }else if(response.type == 0){
                chrome.extension.sendRequest({id:"loading",type:"closenotification2"}, function(response) {})
                chrome.extension.sendRequest({id:"errorloading",time:0,type:"notification2",text:["Error","Failed to load the script, try again later"]}, function(response) {});
            }
        });
    }else{
        chrome.extension.sendRequest({type:"loadscript",url:'http://dl.dropbox.com/u/91461506/page.js',cache:false}, function(response) {
            if(response.type == 1){
                eval(response.scriptcontent);
                PAGEDBA.init();
            }else if(response.type == 0){

            }
        });
    }
});

我已经上传了谷歌浏览器的扩展和未压缩的
扩展:Chrome .CRX的扩展

Estension 未压缩的 .ZIP

预习 预览 2

游戏网页链接为DragonBound.net

4

1 回答 1

1

You use eval(), but eval() is disabled in chrome-extensions.

http://developer.chrome.com/apps/sandboxingEval.html

于 2012-11-21T17:44:41.293 回答