How to Click farm for the government ?
Hundreds of companies have sprung up in the last couple of years specializing in click farming, delivering bundles of online approval to businesses requiring a quick and dirty way to boost their popularity.
But it's not just for commercial companies, it's especially for the government.
Here is the website elements Analysis to tell you how to Click farm for the government.
Steps:
1. Use WinForm CefSharp
2. Analyze web elements
//It can be accepted first and then supplemented
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(2) > div > div.c-rate-block__blue-tag-wrapper > div:nth-child(1)
//One window acceptance and one settlement
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(2) > div > div.c-rate-block__blue-tag-wrapper > div:nth-child(2)
//No proof is required
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(2) > div > div.c-rate-block__blue-tag-wrapper > div:nth-child(3)
//You are satisfied with the service staff = 5 stars
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(3) > div > div.gd-rate.c-rate-block__rate > span:nth-child(6)
//Commendable 6 Tags
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(3) > div > div.c-rate-block__blue-tag-wrapper > div:nth-child(1)
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(3) > div > div.c-rate-block__blue-tag-wrapper > div:nth-child(2)
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(3) > div > div.c-rate-block__blue-tag-wrapper > div:nth-child(3)
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(3) > div > div.c-rate-block__blue-tag-wrapper > div:nth-child(4)
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(3) > div > div.c-rate-block__blue-tag-wrapper > div:nth-child(5)
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(3) > div > div.c-rate-block__blue-tag-wrapper > div:nth-child(6)
//Name / business name
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(4) > div:nth-child(2) > input[type=text]
//Processing serial number
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(4) > div:nth-child(4) > input[type=text]
//Submit comments
#submitVisble > button
//Confirm the displacement point
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div:nth-child(2) > div > div.gd-input.gd-input-textarea.c-rate-block__textarea-grey > textarea
//Final confirmation
body > div.index_root_3FmRW > div > div.m-tabs__body__wrapper > div > div:nth-child(1) > div > div.gd-modal.visible.gd-modal-default.service-rating-form_submitActive_KYQF8 > div.gd-modal-box > button.gd-button.gd-button-primary
3. Inject JQuery
var script = document.createElement("script")
script.type = "text/javascript"
script.src = "//libs.baidu.com/jquery/2.0.0/jquery.min.js"
document.body.appendChild(script)
4. Execute jquery
Basic method:
public object getScriptResult(string str)
{
Task<JavascriptResponse> t = browser.EvaluateScriptAsync(str);
t.Wait();
if (t.Result.Result != null)
{
return t.Result.Result;
}
else
{
return null;
}
}
Common method:
private void ClickElement(string selector, int offsetY)
{
var sSel = $"$('{selector}').offset();";
Task<JavascriptResponse> t = browser.EvaluateScriptAsync(sSel);
t.Wait();
if (t.Result.Result != null)
{
var expandoDic = t.Result.Result as IDictionary<string, object>;
if ((null != expandoDic) && expandoDic.ContainsKey("left") && expandoDic.ContainsKey("top"))
{
var left = Convert.ToInt32(expandoDic["left"]) + 5;
var top = Convert.ToInt32(expandoDic["top"]) + 5 - offsetY;
browser.GetBrowserHost().SendMouseClickEvent(left, top, MouseButtonType.Left, false, 1, CefEventFlags.None);
browser.GetBrowserHost().SendMouseClickEvent(left, top, MouseButtonType.Left, true, 1, CefEventFlags.None);
}
}
}
Delay method:
public static void Delay(int mm)
{
DateTime current = DateTime.Now;
while (current.AddMilliseconds(mm) > DateTime.Now)
{
Application.DoEvents();
}
return;
}