+1(514) 937-9445 or Toll-free (Canada & US) +1 (888) 947-9445

Email timing for test invite ??

sansnom

Hero Member
Mar 10, 2017
216
36
For those who know C#, here is a script:

using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;


namespace ECAS
{
class Program
{
static Regex RegexHistory = new Regex("\"viewcasehistory\\.do\\?.+\"");
static Regex RegexStatus = new Regex("<li .+?>(.+)<\\/li>");
static async Task Run(string UCI, string Name, string DOB, string COB)
{
var client = new HttpClient();
client.BaseAddress = new Uri("https://services3.cic.gc.ca/");
client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0");
client.DefaultRequestHeaders.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
client.DefaultRequestHeaders.Add("Referer", "https://services3.cic.gc.ca/ecas/security.do");
await client.GetStringAsync("/ecas/security.do?lang=en");
await client.PostAsync("/ecas/security.do", new StringContent("lang=&app=&securityInd=agree&_target1=Continue", Encoding.UTF8, "application/x-www-form-urlencoded"));
var status = await client.PostAsync("/ecas/authenticate.do", new StringContent("lang=&_page=_target0&app=&identifierType=1&identifier=" + UCI + "&surname=" + Name + "&dateOfBirth=" + DOB + "&countryOfBirth=" + COB + "&_submit=Continue", Encoding.UTF8, "application/x-www-form-urlencoded"));
foreach (Match match in RegexHistory.Matches(await status.Content.ReadAsStringAsync()))
{
var path = "/ecas/" + WebUtility.HtmlDecode(match.Value.Trim('\"'));
var data = await client.GetStringAsync(path);

data = data.Substring(data.IndexOf("<form"));
data = data.Substring(0, data.IndexOf("</form>"));
data = data.Substring(data.IndexOf("<ol>") + "<ol>".Length);
data = data.Substring(0, data.IndexOf("</ol>"));
data = data.Trim();
foreach (Match m in RegexStatus.Matches(data))
{
Console.WriteLine(m.Groups[1]);
Console.WriteLine();
}
}
}
static void Main(string[] args)
{
var Config = Path.ChangeExtension(System.Reflection.Assembly.GetEntryAssembly().Location, "ini");
if (!File.Exists(Config))
{
using (var file = new StreamWriter(Config))
{
Console.Write("UCI: ");
file.WriteLine(Console.ReadLine());
Console.Write("Surname: ");
file.WriteLine(Console.ReadLine());
Console.Write("Date of birth (YYYY-MM-DD): ");
file.WriteLine(Console.ReadLine());
Console.Write("Country of birth (code): ");
file.WriteLine(Console.ReadLine());
}
}
using (var file = new StreamReader(Config))
{
Run(file.ReadLine(), file.ReadLine(), file.ReadLine(), file.ReadLine()).Wait();
}
Console.Write("Press any key to continue . . .");
Console.ReadKey();
}
}
}
 
  • Like
Reactions: razerblade

razerblade

VIP Member
Feb 21, 2014
4,197
1,355
For those who know C#, here is a script:

using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;


namespace ECAS
{
class Program
{
static Regex RegexHistory = new Regex("\"viewcasehistory\\.do\\?.+\"");
static Regex RegexStatus = new Regex("<li .+?>(.+)<\\/li>");
static async Task Run(string UCI, string Name, string DOB, string COB)
{
var client = new HttpClient();
client.BaseAddress = new Uri("https://services3.cic.gc.ca/");
client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0");
client.DefaultRequestHeaders.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
client.DefaultRequestHeaders.Add("Referer", "https://services3.cic.gc.ca/ecas/security.do");
await client.GetStringAsync("/ecas/security.do?lang=en");
await client.PostAsync("/ecas/security.do", new StringContent("lang=&app=&securityInd=agree&_target1=Continue", Encoding.UTF8, "application/x-www-form-urlencoded"));
var status = await client.PostAsync("/ecas/authenticate.do", new StringContent("lang=&_page=_target0&app=&identifierType=1&identifier=" + UCI + "&surname=" + Name + "&dateOfBirth=" + DOB + "&countryOfBirth=" + COB + "&_submit=Continue", Encoding.UTF8, "application/x-www-form-urlencoded"));
foreach (Match match in RegexHistory.Matches(await status.Content.ReadAsStringAsync()))
{
var path = "/ecas/" + WebUtility.HtmlDecode(match.Value.Trim('\"'));
var data = await client.GetStringAsync(path);

data = data.Substring(data.IndexOf("<form"));
data = data.Substring(0, data.IndexOf("</form>"));
data = data.Substring(data.IndexOf("<ol>") + "<ol>".Length);
data = data.Substring(0, data.IndexOf("</ol>"));
data = data.Trim();
foreach (Match m in RegexStatus.Matches(data))
{
Console.WriteLine(m.Groups[1]);
Console.WriteLine();
}
}
}
static void Main(string[] args)
{
var Config = Path.ChangeExtension(System.Reflection.Assembly.GetEntryAssembly().Location, "ini");
if (!File.Exists(Config))
{
using (var file = new StreamWriter(Config))
{
Console.Write("UCI: ");
file.WriteLine(Console.ReadLine());
Console.Write("Surname: ");
file.WriteLine(Console.ReadLine());
Console.Write("Date of birth (YYYY-MM-DD): ");
file.WriteLine(Console.ReadLine());
Console.Write("Country of birth (code): ");
file.WriteLine(Console.ReadLine());
}
}
using (var file = new StreamReader(Config))
{
Run(file.ReadLine(), file.ReadLine(), file.ReadLine(), file.ReadLine()).Wait();
}
Console.Write("Press any key to continue . . .");
Console.ReadKey();
}
}
}
Nice! Haven't used Csharp, but know a lot of other languages and can make sense of most of it.
 

mosaab

Hero Member
Oct 12, 2011
553
120
Category........
Visa Office......
Cairo
Job Offer........
Pre-Assessed..
App. Filed.......
20-03-2013
AOR Received.
26-06-2013
File Transfer...
05-07-2013
Med's Done....
18-05-2013
Interview........
waived
Passport Req..
06-01-2014
VISA ISSUED...
03-16-2014
LANDED..........
05-02-2014
Well, my knowledge is based on what people report on this forum. I have noticed that ECAS only updates once a day, in the morning on weekdays. I'm not sure if it does on weekends. I don't recall a case where it did.

For test invites, I've only ever seen them being sent on weekdays because those come from the local office. Haven't come accross anyone who received their invite at night time, unlike AORs.

AORs are sent by CPC-Sydney. I believe they were/are working overtime to catch up with the influx of applications.

Again, this is all based on what I've noticed on this forum. I could be wrong.
Yes you are right. I have noticed that but wasn't sure. Thx
 

amitdi

Hero Member
Dec 19, 2013
503
162
For those who know C#, here is a script:

using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;


namespace ECAS
{
class Program
{
static Regex RegexHistory = new Regex("\"viewcasehistory\\.do\\?.+\"");
static Regex RegexStatus = new Regex("<li .+?>(.+)<\\/li>");
static async Task Run(string UCI, string Name, string DOB, string COB)
{
var client = new HttpClient();
client.BaseAddress = new Uri("https://services3.cic.gc.ca/");
client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0");
client.DefaultRequestHeaders.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
client.DefaultRequestHeaders.Add("Referer", "https://services3.cic.gc.ca/ecas/security.do");
await client.GetStringAsync("/ecas/security.do?lang=en");
await client.PostAsync("/ecas/security.do", new StringContent("lang=&app=&securityInd=agree&_target1=Continue", Encoding.UTF8, "application/x-www-form-urlencoded"));
var status = await client.PostAsync("/ecas/authenticate.do", new StringContent("lang=&_page=_target0&app=&identifierType=1&identifier=" + UCI + "&surname=" + Name + "&dateOfBirth=" + DOB + "&countryOfBirth=" + COB + "&_submit=Continue", Encoding.UTF8, "application/x-www-form-urlencoded"));
foreach (Match match in RegexHistory.Matches(await status.Content.ReadAsStringAsync()))
{
var path = "/ecas/" + WebUtility.HtmlDecode(match.Value.Trim('\"'));
var data = await client.GetStringAsync(path);

data = data.Substring(data.IndexOf("<form"));
data = data.Substring(0, data.IndexOf("</form>"));
data = data.Substring(data.IndexOf("<ol>") + "<ol>".Length);
data = data.Substring(0, data.IndexOf("</ol>"));
data = data.Trim();
foreach (Match m in RegexStatus.Matches(data))
{
Console.WriteLine(m.Groups[1]);
Console.WriteLine();
}
}
}
static void Main(string[] args)
{
var Config = Path.ChangeExtension(System.Reflection.Assembly.GetEntryAssembly().Location, "ini");
if (!File.Exists(Config))
{
using (var file = new StreamWriter(Config))
{
Console.Write("UCI: ");
file.WriteLine(Console.ReadLine());
Console.Write("Surname: ");
file.WriteLine(Console.ReadLine());
Console.Write("Date of birth (YYYY-MM-DD): ");
file.WriteLine(Console.ReadLine());
Console.Write("Country of birth (code): ");
file.WriteLine(Console.ReadLine());
}
}
using (var file = new StreamReader(Config))
{
Run(file.ReadLine(), file.ReadLine(), file.ReadLine(), file.ReadLine()).Wait();
}
Console.Write("Press any key to continue . . .");
Console.ReadKey();
}
}
}
oh boy, that escalated quickly !!
 

Quink

Hero Member
Oct 28, 2014
854
139
Category........
Job Offer........
Pre-Assessed..
App. Filed.......
11-12-2014
AOR Received.
30-04-2015 (EP and UCI)
Med's Request
07-05-2015
Med's Done....
12-05-2015 (ECAS updated 20-05-2015)
VISA ISSUED...
IP update 26-8-2015, DM 14-9-2015, READY FOR VISA EMAIL 21-9-2015
LANDED..........
30-09-2015 (PR Card received 13-01-2016)
Nothing to see here, its one of those unproductive threads with no real information...
There's as much good information here as in any other that tries to predict the future! o_O