You crack me up!!!I check my mailbox at least 20 times in a hour, need to get some sanity now
You crack me up!!!I check my mailbox at least 20 times in a hour, need to get some sanity now
Nice! Haven't used Csharp, but know a lot of other languages and can make sense of most of it.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();
}
}
}
Yes you are right. I have noticed that but wasn't sure. ThxWell, 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.
oh boy, that escalated quickly !!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();
}
}
}
There's as much good information here as in any other that tries to predict the future!Nothing to see here, its one of those unproductive threads with no real information...