Imacros-邀请码缺少3个字母/数字 [英] Imacros - Invitation code missing 3 letters/numbers

查看:181
本文介绍了Imacros-邀请码缺少3个字母/数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IMACROS. 我必须找出网站的邀请代码,该代码包含字母(a-z)和数字(0-9).遗漏了3个,例如XXX.但是,如何为Imacros上的体贴字母和数字做一个"for"?我必须使用javascript吗?

IMACROS. I have to find out a invitation code to a site, it's a code that contains letters(a-z) and numbers(0-9). There are 3 missing, the XXX for exemple. But, how do I make a "for" to considerate letters and numbers on Imacros? I have to use javascript?

这是我的代码:

VERSION BUILD=8820413 RECORDER=FX
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=(url site)
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:confirmcod.php ATTR=NAME:cod CONTENT=123XXXabc
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:confirmcod.php ATTR=*

推荐答案

一种无需使用Javascript即可实现此目的的方法是,使用链接的所有可能组合预加载数据源.遍历此文档,直到找到正确的链接.

One way to do this without using Javascript is to preload a datasource with all of the possible combinations for the link. Iterate over this document until you find the proper link.

VERSION BUILD=8820413 RECORDER=FX
TAB T=1
TAB CLOSEALLOTHERS
SET !DATASOURCE c:\mysource 
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO=(url site)
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:confirmcod.php ATTR=NAME:cod CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:confirmcod.php ATTR=*

用于iMacro数据源的Wiki 页面.

Wiki page for iMacro Datasource.

如果要使用javascript,则需要使用 iimPlay 即时生成宏代码.下面的示例迭代检查随机字符串,直到iMacros返回1或sOK.

If you want to use javascript you will need to use iimPlay to generate the macro code on the fly. The example below iterates checks a random strings until iMacros returns 1 or sOK.

// possible keys for the link
var keys = '0123456789abcdefghijklmnopqrstuvwxyz';
// array to store past keys
var keyArray = [];
var myKey = "";
var i, j, k = 0;
var pageNotFound = true;
var macro = "";
var retCode = 0;
var myURL = "http://www.google.com";
do
{
    i = keys.charAt(Math.floor(Math.random()*keys.length))
    j = keys.charAt(Math.floor(Math.random()*keys.length));
    k = keys.charAt(Math.floor(Math.random()*keys.length));
    myKey = i + j + k;
    if (keyArray.indexOf(myKey, 0) < 0)
    {
        keyArray.push(myKey);
        // run imacro code with this key
        macro = "CODE:";
        macro += "TAB T=1\n";
        macro += "TAB CLOSEALLOTHERS\n";

        macro += "URL GOTO=" + myURL + "\n";
        macro += "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:gbqf ATTR=ID:gbqfq CONTENT=" + myKey + "\n";
        macro += "TAG POS=1 TYPE=BUTTON FORM=ID:gbqf ATTR=ID:gbqfb\n";
        retCode = iimPlay(macro);
        // check if the page is found
        if (retCode)
        {
            // if page is found set pageNotFound = false;
            pageNotFound = false;
        }
    } else {
        // key has been used already, try a different one.
    }
} while(pageNotFound);

这篇关于Imacros-邀请码缺少3个字母/数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆