Help me *.js login change pass gmail

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Help me *.js login change pass gmail

by jinjinda on Sun Dec 17, 2017 12:33 am

iMacros 8.9.7
OS win 10 64 bit
FF 47.0.1 with user agent ios 9.2

I have this script from my friend but now I can not contact that person. I do not understand the paths and files written in that script. Pls help me! thank so much!

Script here
Code: Select all
for(k=0;k<50;k++)
{

var pathtientrinh;
   pathtientrinh="CODE:";
   pathtientrinh+="SET !DATASOURCE duongdandatasource.txt"+"\n";
   pathtientrinh+="SET !DATASOURCE_LINE 1"+"\n";
   pathtientrinh+="SET !EXTRACT {{!COL1}}"+"\n";
   iimPlay(pathtientrinh);
   var duongdandatasource = iimGetLastExtract(1);
iimSet("duongdandatasource",duongdandatasource);
iimPlay("CODE:FILEDELETE NAME={{duongdandatasource}}\\urlcurrent.txt");
var linhdangnie = duongdandatasource;
var datasource = linhdangnie+"\\";
var csv_file_name = "CurrentCookie.txt";
const CRLF = "\r\n";
const LF = "\n";
var lines = new Array();
var file_i = imns.FIO.openNode(datasource+csv_file_name);
var text = imns.FIO.readTextFile(file_i);
var eol = (text.indexOf(CRLF) == -1) ? LF : CRLF;
lines = text.split(eol);
eol = lines.length;
iimSet("duongdandatasource",duongdandatasource);
iimDisplay(eol);
var stt;
stt =  "CODE:";
stt +=  "SET !EXTRACT {{stt2}}" + "\n";
stt +=  "SAVEAS TYPE=EXTRACT FOLDER={{duongdandatasource}} FILE=CurrentCookie.txt" + "\n";
iimSet("duongdandatasource",duongdandatasource);
iimSet("stt2",eol);
iimPlay(stt)

//login
var login;
login =  "CODE:";
login +=  "CLEAR" + "\n";
login +=  "TAB CLOSEALLOTHERS" + "\n";
login +=  "SET !TIMEOUT 20" + "\n";
login +=  "SET !TIMEOUT_STEP 0" + "\n";
login +=  "SET !EXTRACT_TEST_POPUP NO" + "\n";
login +=  "SET !EXTRACT NULL" + "\n";
login +=  "SET !VAR8 NULL" + "\n";
login +=  "SET !ERRORIGNORE YES" + "\n"; 
login +=  "SET !DATASOURCE {{duongdandatasource}}\\acc.txt" + "\n";
login +=  "SET !DATASOURCE_LINE {{name}}" + "\n";
login +=  "SET !EXTRACT {{!COL2}}"+"\n";
login +=  "URL GOTO=https://accounts.google.com/signin/v2/identifier?passive=1209600&continue=https%3A%2F%2Faccounts.google.com%2FManageAccount&followup=https%3A%2F%2Faccounts.google.com%2FManageAccount&flowName=GlifWebSignIn&flowEntry=ServiceLogin" + "\n";
login +=  "TAG POS=1 TYPE=INPUT:EMAIL FORM=NAME:NoFormName ATTR=ID:identifierId CONTENT={{!COL1}}<SP>" + "\n";
login +=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Next" + "\n";
login +=  "WAIT SECONDS=4" + "\n";
login +=  "SET !ENCRYPTION NO" + "\n";
login +=  "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:/signin/v2/challenge/password/empty ATTR=NAME:password CONTENT={{!COl2}}<SP>" + "\n"; ;
login +=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Next" + "\n";
login +=  "WAIT SECONDS=3" + "\n";
iimSet("duongdandatasource",duongdandatasource);
iimSet("name",eol);
iimPlay(login);
var luachon = iimGetLastExtract(1);
iimDisplay(luachon);


if(window.document.URL.indexOf("speedbump/changepassword?continue=")>=0)
{

var changepasss;
changepasss =  "CODE:";
changepasss +=  "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:/speedbump/changepassword ATTR=ID:Password CONTENT={{passchange}}2017" + "\n";
changepasss +=  "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:/speedbump/changepassword ATTR=ID:ConfirmPassword CONTENT={{passchange}}2017" + "\n";
changepasss +=  "TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/speedbump/changepassword ATTR=ID:submit" + "\n";
iimSet("passchange",luachon);
iimPlay(changepasss)
iimPlay("CODE:WAIT SECONDS=2");
var pass;
pass =  "CODE:";
pass +=  "SET !EXTRACT {{pass2}}2017" + "\n";
pass +=  "SAVEAS TYPE=EXTRACT FOLDER={{duongdandatasource}} FILE=passchange.txt" + "\n";
iimSet("duongdandatasource",duongdandatasource);
iimSet("pass2",luachon);
iimPlay(pass)
}



if(window.document.URL.indexOf("signin/v2/challenge/kpe?passive=")>=0||window.document.URL.indexOf("signin/v2/challenge/selection?passive")>=0||window.document.URL.indexOf("signin/v2/challenge/selection")>=0)
{
//iimPlay("#aXacMinhDiadiem2.iim")

var xacminhemail;
xacminhemail =  "CODE:";
xacminhemail +=  "SET !TIMEOUT_STEP 0" + "\n";
xacminhemail +=  "SET !EXTRACT_TEST_POPUP NO" + "\n";
xacminhemail +=  "SET !EXTRACT NULL" + "\n";
xacminhemail +=  "SET !VAR8 NULL" + "\n";
xacminhemail +=  "SET !ERRORIGNORE YES " + "\n";
xacminhemail +=  "SET !USERAGENT {{!COL1}}" + "\n";
xacminhemail +=  "SET !DATASOURCE {{duongdandatasource}}\\acc.txt" + "\n";
xacminhemail +=  "SET !DATASOURCE_LINE  {{name}}" + "\n";
xacminhemail +=  "TAG POS=2 TYPE=DIV ATTR=TXT:Confirm<SP>your<SP>recovery<SP>email" + "\n";
xacminhemail +=  "WAIT SECONDS=4" + "\n";
xacminhemail +=  "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:knowledge-preregistered-email-response CONTENT={{!COl3}}" + "\n";
xacminhemail +=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Next" + "\n";
xacminhemail +=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Tiếp<SP>theo" + "\n";
xacminhemail +=  "WAIT SECONDS=4" + "\n";
iimSet("duongdandatasource",duongdandatasource);
iimSet("name",eol);
iimPlay(xacminhemail);



if(window.document.URL.indexOf("signin/v2/challenge/kpe?")>=0||window.document.URL.indexOf("signin/v2/challenge/selection?passive")>=0||window.document.URL.indexOf("signin/v2/challenge/selection")>=0)
{
var xacminhmail2;
xacminhmail2 =  "CODE:";
xacminhmail2 +=  "SET !ERRORIGNORE YES " + "\n";
xacminhmail2 +=  "SET !TIMEOUT_STEP 0" + "\n"; 
xacminhmail2 +=  "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:knowledge-preregistered-email-response CONTENT=vntricky@gmail.com" + "\n";
xacminhmail2 +=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Next" + "\n";
xacminhmail2 +=  "WAIT SECONDS=4" + "\n";
iimPlay(xacminhmail2)
}

/*if(window.document.URL.indexOf("signin/v2/challenge/selection")>=0)
{
iimPlay("#aXacMinhDiadiem.iim")
}*/
}
}


i don't understand
Code: Select all
var pathtientrinh;
   pathtientrinh="CODE:";
   pathtientrinh+="SET !DATASOURCE duongdandatasource.txt"+"\n";
   pathtientrinh+="SET !DATASOURCE_LINE 1"+"\n";
   pathtientrinh+="SET !EXTRACT {{!COL1}}"+"\n";
   iimPlay(pathtientrinh);
   var duongdandatasource = iimGetLastExtract(1);
iimSet("duongdandatasource",duongdandatasource);
iimPlay("CODE:FILEDELETE NAME={{duongdandatasource}}\\urlcurrent.txt");
var linhdangnie = duongdandatasource;
var datasource = linhdangnie+"\\";
var csv_file_name = "CurrentCookie.txt";
const CRLF = "\r\n";
const LF = "\n";
var lines = new Array();
var file_i = imns.FIO.openNode(datasource+csv_file_name);
var text = imns.FIO.readTextFile(file_i);
var eol = (text.indexOf(CRLF) == -1) ? LF : CRLF;
lines = text.split(eol);
eol = lines.length;
iimSet("duongdandatasource",duongdandatasource);
iimDisplay(eol);
var stt;
stt =  "CODE:";
stt +=  "SET !EXTRACT {{stt2}}" + "\n";
stt +=  "SAVEAS TYPE=EXTRACT FOLDER={{duongdandatasource}} FILE=CurrentCookie.txt" + "\n";
iimSet("duongdandatasource",duongdandatasource);
iimSet("stt2",eol);
iimPlay(stt)
jinjinda
 
Posts: 4
Joined: Mon Nov 27, 2017 10:15 pm

Re: Help me *.js login change pass gmail

by chivracq on Tue Dec 19, 2017 6:45 pm

jinjinda wrote:
Code: Select all
iMacros 8.9.7
OS win 10 64 bit
FF 47.0.1 with user agent ios 9.2


I have this script from my friend but now I can not contact that person. I do not understand the paths and files written in that script. Pls help me! thank so much!

Script here
Code: Select all
for(k=0;k<50;k++)
{

var pathtientrinh;
   pathtientrinh="CODE:";
   pathtientrinh+="SET !DATASOURCE duongdandatasource.txt"+"\n";
   pathtientrinh+="SET !DATASOURCE_LINE 1"+"\n";
   pathtientrinh+="SET !EXTRACT {{!COL1}}"+"\n";
   iimPlay(pathtientrinh);
   var duongdandatasource = iimGetLastExtract(1);
iimSet("duongdandatasource",duongdandatasource);
iimPlay("CODE:FILEDELETE NAME={{duongdandatasource}}\\urlcurrent.txt");
var linhdangnie = duongdandatasource;
var datasource = linhdangnie+"\\";
var csv_file_name = "CurrentCookie.txt";
const CRLF = "\r\n";
const LF = "\n";
var lines = new Array();
var file_i = imns.FIO.openNode(datasource+csv_file_name);
var text = imns.FIO.readTextFile(file_i);
var eol = (text.indexOf(CRLF) == -1) ? LF : CRLF;
lines = text.split(eol);
eol = lines.length;
iimSet("duongdandatasource",duongdandatasource);
iimDisplay(eol);
var stt;
stt =  "CODE:";
stt +=  "SET !EXTRACT {{stt2}}" + "\n";
stt +=  "SAVEAS TYPE=EXTRACT FOLDER={{duongdandatasource}} FILE=CurrentCookie.txt" + "\n";
iimSet("duongdandatasource",duongdandatasource);
iimSet("stt2",eol);
iimPlay(stt)

//login
var login;
login =  "CODE:";
login +=  "CLEAR" + "\n";
login +=  "TAB CLOSEALLOTHERS" + "\n";
login +=  "SET !TIMEOUT 20" + "\n";
login +=  "SET !TIMEOUT_STEP 0" + "\n";
login +=  "SET !EXTRACT_TEST_POPUP NO" + "\n";
login +=  "SET !EXTRACT NULL" + "\n";
login +=  "SET !VAR8 NULL" + "\n";
login +=  "SET !ERRORIGNORE YES" + "\n"; 
login +=  "SET !DATASOURCE {{duongdandatasource}}\\acc.txt" + "\n";
login +=  "SET !DATASOURCE_LINE {{name}}" + "\n";
login +=  "SET !EXTRACT {{!COL2}}"+"\n";
login +=  "URL GOTO=https://accounts.google.com/signin/v2/identifier?passive=1209600&continue=https%3A%2F%2Faccounts.google.com%2FManageAccount&followup=https%3A%2F%2Faccounts.google.com%2FManageAccount&flowName=GlifWebSignIn&flowEntry=ServiceLogin" + "\n";
login +=  "TAG POS=1 TYPE=INPUT:EMAIL FORM=NAME:NoFormName ATTR=ID:identifierId CONTENT={{!COL1}}<SP>" + "\n";
login +=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Next" + "\n";
login +=  "WAIT SECONDS=4" + "\n";
login +=  "SET !ENCRYPTION NO" + "\n";
login +=  "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:/signin/v2/challenge/password/empty ATTR=NAME:password CONTENT={{!COl2}}<SP>" + "\n"; ;
login +=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Next" + "\n";
login +=  "WAIT SECONDS=3" + "\n";
iimSet("duongdandatasource",duongdandatasource);
iimSet("name",eol);
iimPlay(login);
var luachon = iimGetLastExtract(1);
iimDisplay(luachon);


if(window.document.URL.indexOf("speedbump/changepassword?continue=")>=0)
{

var changepasss;
changepasss =  "CODE:";
changepasss +=  "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:/speedbump/changepassword ATTR=ID:Password CONTENT={{passchange}}2017" + "\n";
changepasss +=  "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:/speedbump/changepassword ATTR=ID:ConfirmPassword CONTENT={{passchange}}2017" + "\n";
changepasss +=  "TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/speedbump/changepassword ATTR=ID:submit" + "\n";
iimSet("passchange",luachon);
iimPlay(changepasss)
iimPlay("CODE:WAIT SECONDS=2");
var pass;
pass =  "CODE:";
pass +=  "SET !EXTRACT {{pass2}}2017" + "\n";
pass +=  "SAVEAS TYPE=EXTRACT FOLDER={{duongdandatasource}} FILE=passchange.txt" + "\n";
iimSet("duongdandatasource",duongdandatasource);
iimSet("pass2",luachon);
iimPlay(pass)
}



if(window.document.URL.indexOf("signin/v2/challenge/kpe?passive=")>=0||window.document.URL.indexOf("signin/v2/challenge/selection?passive")>=0||window.document.URL.indexOf("signin/v2/challenge/selection")>=0)
{
//iimPlay("#aXacMinhDiadiem2.iim")

var xacminhemail;
xacminhemail =  "CODE:";
xacminhemail +=  "SET !TIMEOUT_STEP 0" + "\n";
xacminhemail +=  "SET !EXTRACT_TEST_POPUP NO" + "\n";
xacminhemail +=  "SET !EXTRACT NULL" + "\n";
xacminhemail +=  "SET !VAR8 NULL" + "\n";
xacminhemail +=  "SET !ERRORIGNORE YES " + "\n";
xacminhemail +=  "SET !USERAGENT {{!COL1}}" + "\n";
xacminhemail +=  "SET !DATASOURCE {{duongdandatasource}}\\acc.txt" + "\n";
xacminhemail +=  "SET !DATASOURCE_LINE  {{name}}" + "\n";
xacminhemail +=  "TAG POS=2 TYPE=DIV ATTR=TXT:Confirm<SP>your<SP>recovery<SP>email" + "\n";
xacminhemail +=  "WAIT SECONDS=4" + "\n";
xacminhemail +=  "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:knowledge-preregistered-email-response CONTENT={{!COl3}}" + "\n";
xacminhemail +=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Next" + "\n";
xacminhemail +=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Tiếp<SP>theo" + "\n";
xacminhemail +=  "WAIT SECONDS=4" + "\n";
iimSet("duongdandatasource",duongdandatasource);
iimSet("name",eol);
iimPlay(xacminhemail);



if(window.document.URL.indexOf("signin/v2/challenge/kpe?")>=0||window.document.URL.indexOf("signin/v2/challenge/selection?passive")>=0||window.document.URL.indexOf("signin/v2/challenge/selection")>=0)
{
var xacminhmail2;
xacminhmail2 =  "CODE:";
xacminhmail2 +=  "SET !ERRORIGNORE YES " + "\n";
xacminhmail2 +=  "SET !TIMEOUT_STEP 0" + "\n"; 
xacminhmail2 +=  "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:knowledge-preregistered-email-response CONTENT=vntricky@gmail.com" + "\n";
xacminhmail2 +=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Next" + "\n";
xacminhmail2 +=  "WAIT SECONDS=4" + "\n";
iimPlay(xacminhmail2)
}

/*if(window.document.URL.indexOf("signin/v2/challenge/selection")>=0)
{
iimPlay("#aXacMinhDiadiem.iim")
}*/
}
}


i don't understand
Code: Select all
var pathtientrinh;
   pathtientrinh="CODE:";
   pathtientrinh+="SET !DATASOURCE duongdandatasource.txt"+"\n";
   pathtientrinh+="SET !DATASOURCE_LINE 1"+"\n";
   pathtientrinh+="SET !EXTRACT {{!COL1}}"+"\n";
   iimPlay(pathtientrinh);
   var duongdandatasource = iimGetLastExtract(1);
iimSet("duongdandatasource",duongdandatasource);
iimPlay("CODE:FILEDELETE NAME={{duongdandatasource}}\\urlcurrent.txt");
var linhdangnie = duongdandatasource;
var datasource = linhdangnie+"\\";
var csv_file_name = "CurrentCookie.txt";
const CRLF = "\r\n";
const LF = "\n";
var lines = new Array();
var file_i = imns.FIO.openNode(datasource+csv_file_name);
var text = imns.FIO.readTextFile(file_i);
var eol = (text.indexOf(CRLF) == -1) ? LF : CRLF;
lines = text.split(eol);
eol = lines.length;
iimSet("duongdandatasource",duongdandatasource);
iimDisplay(eol);
var stt;
stt =  "CODE:";
stt +=  "SET !EXTRACT {{stt2}}" + "\n";
stt +=  "SAVEAS TYPE=EXTRACT FOLDER={{duongdandatasource}} FILE=CurrentCookie.txt" + "\n";
iimSet("duongdandatasource",duongdandatasource);
iimSet("stt2",eol);
iimPlay(stt)

v8.9.7 for FF..., good, because your Script uses some Syntax(es) not supported anymore in v9.0.3...

But pfff..., had a look at your Thread when you posted it, 2 or 3 days ago already, but pfff + Double-pfffffffff...!, I guess your "Friend" handles Money-Laundering for some Drugs Cartel(s)..., Okay...!, why not...!? :shock: , but it doesn't work "like that" with iMacros Scripts..., sorry...!
=> Your/His Script is completely cumbersome, jumping from one DataSource to the next one, is OK for once, is a very good Workaround for some Limitations, but this Script looks nearly like a "Joke/Caricature" to me...

I can follow it, but pfff, no wonder that you get a bit lost..., but hum, the Script is using Commands that have been deprecated for 6 or 8 years, then I would think, you had already all those years to try to understand it... :roll:

And your "i don't understand" + Script Nb_2 is a bit vague..., I'm not going to explain to you what your Script is doing, like I said you already had a few years to try to understand it... :roll: , but what it your Pb now...!?
=> The only Info we have about your Pb is your Thread Title: "Help me *.js login change pass gmail", the "Help me" part is completely useless of course btw...! :roll: , => explain what your Pb is and what you want... :idea:

(And next time you ask/get Friends to write Scripts for you, ask them to put Comments in their Script, or you after understanding what their Script is doing..., is always "Good Practice", just saying...! :idea: )
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6962
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 10 guests

-->