本文整理汇总了C#中BaseLib.clsDBQueryManager.SelectPublicProxyData方法的典型用法代码示例。如果您正苦于以下问题:C# clsDBQueryManager.SelectPublicProxyData方法的具体用法?C# clsDBQueryManager.SelectPublicProxyData怎么用?C# clsDBQueryManager.SelectPublicProxyData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseLib.clsDBQueryManager
的用法示例。
在下文中一共展示了clsDBQueryManager.SelectPublicProxyData方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetPublicProxies
public List<string> GetPublicProxies()
{
List<string> lst_Proxies = new List<string>();
try
{
clsDBQueryManager setting = new clsDBQueryManager();
DataSet ds = setting.SelectPublicProxyData();
if (ds.Tables != null && ds.Tables["tb_Proxies"].Rows.Count > 0)
{
foreach (DataRow dRow in ds.Tables["tb_Proxies"].Rows)
{
string Proxy = dRow.ItemArray[0].ToString() + ":" + dRow.ItemArray[1].ToString() + ":" + dRow.ItemArray[2].ToString() + ":" + dRow.ItemArray[3].ToString();
lst_Proxies.Add(Proxy);
}
}
}
catch { }
return lst_Proxies;
}
示例2: SignupPage
public void SignupPage()
{
clsDBQueryManager SetDb = new clsDBQueryManager();
DataSet ds = new DataSet();
//bool UsePublicProxy = false;
int counter_Username = 0;
foreach (string EmailPassword in LstAccountcreationEmailPassword)
{
StartAgain:
try
{
GlobusHttpHelper httpHelper = new GlobusHttpHelper();
string[] array = Regex.Split(EmailPassword, ":");
string email = array[0];
string password = array[1];
string username = string.Empty;
string ProxyAdress = string.Empty;
string ProxyPort = string.Empty;
string Proxy = string.Empty;
AddToProxyAccountCreationLog("Clearing Cookies");
ClearCookies();
if (chkboxUsePublicProxies.Checked)
{
try
{
ds = SetDb.SelectPublicProxyData();
if (ds.Tables[0].Rows.Count != 0)
{
int index = RandomNumberGenerator.GenerateRandom(0, ds.Tables[0].Rows.Count);
DataRow dr = ds.Tables[0].Rows[countForInstance];
Proxy = dr.ItemArray[0].ToString() + ":" + dr.ItemArray[1].ToString() + ":" + dr.ItemArray[2].ToString() + ":" + dr.ItemArray[3].ToString();
string[] ProxyList = Regex.Split(Proxy, ":");
ProxyAdress = ProxyList[0];
ProxyPort = ProxyList[1];
AddToProxyAccountCreationLog("Using Proxy Address : - " + ProxyAdress + ":" + ProxyPort);
}
else
{
AddToProxyAccountCreationLog("Please Uplaod Public Proxies");
break;
}
}
catch (Exception ex)
{
}
}
AddToProxyAccountCreationLog("Setting Proxy");
Thread.Sleep(2000);
SetProxy(ProxyAdress, ProxyPort);
Thread.Sleep(2000);
IE explorer = new IE();
Thread.Sleep(1000);
if (LstAccountcreationUsername.Count > 0)
{
if (counter_Username < LstAccountcreationUsername.Count)
{
username = LstAccountcreationUsername[counter_Username];
counter_Username++;
}
else
{
AddToProxyAccountCreationLog("*********** /n All Usernames have been taken /n ***********");
break;
}
}
else
{
AddToProxyAccountCreationLog("Please Upload Usernames To Create Twitter Accounts");
break;
}
string name = LstAccountCreationName[countForInstance];
string capcthaUrl = string.Empty;
try
{
explorer.GoTo("https://twitter.com/signup");
string PageSource = explorer.Html.ToString();
if (PageSource.Contains("Sign out"))
{
explorer.Link(Find.ById("signout-button")).Click();
Thread.Sleep(2000);
explorer.GoTo("https://twitter.com/signup");
Thread.Sleep(2000);
}
}
catch (Exception ex)
{
AddToProxyAccountCreationLog("Taking too Long To respond.Page Not Loaded Fully");
break;
//.........这里部分代码省略.........
示例3: chkboxPublicProxy_CheckedChanged
private void chkboxPublicProxy_CheckedChanged(object sender, EventArgs e)
{
try
{
if (chkboxPublicProxy.Checked == true)
{
clsDBQueryManager SetDb = new clsDBQueryManager();
DataSet ds = new DataSet();
ds = SetDb.SelectPublicProxyData();
if (ds.Tables[0].Rows.Count > 0)
{
}
else
{
MessageBox.Show("Please Import Proxy Files. We Are redirecting you to Proxy Tab");
tabMain.SelectedIndex = 7;
}
AddToListAccountsLogs(ds.Tables[0].Rows.Count + " Public Proxies loaded from DataBase");
AddToGeneralLogs(ds.Tables[0].Rows.Count + " Public Proxies loaded from DataBase");
}
}
catch (Exception ex)
{
AddToListAccountsLogs(ex.Message);
}
}
示例4: StartSignUpMultithreaded
private void StartSignUpMultithreaded()
{
try
{
clsDBQueryManager SetDb = new clsDBQueryManager();
DataSet ds = new DataSet();
//bool UsePublicProxy = false;
if (chkboxPublicProxy.Checked)
{
ds = SetDb.SelectPublicProxyData();
}
else if (chkboxPrivateProxy.Checked)
{
ds = SetDb.SelectPrivateProxyData();
}
if (chkboxUseFakeEmailAccounts.Checked)
{
listEmails = Globals.FakeEmailList;
}
int numberOfThreads = 10;
if (Globals.IdCheck.IsMatch(txtNumberOfThreads.Text) && !string.IsNullOrEmpty(txtNumberOfThreads.Text))
{
numberOfThreads = int.Parse(txtNumberOfThreads.Text);
}
TwitterSignup.TwitterSignUp twitterSignUp = new TwitterSignup.TwitterSignUp();
int counter_Name = 0;
int counter_Username = 0;
listEmails = listEmails.Distinct().ToList();
if (listEmails.Count > 0)
{
foreach (string email in listEmails)
{
string Proxy = string.Empty;
if (chkboxPublicProxy.Checked)
{
try
{
if (ds.Tables[0].Rows.Count != 0)
{
int index = RandomNumberGenerator.GenerateRandom(0, ds.Tables[0].Rows.Count);
DataRow dr = ds.Tables[0].Rows[index];
Proxy = dr.ItemArray[0].ToString() + ":" + dr.ItemArray[1].ToString() + ":" + dr.ItemArray[2].ToString() + ":" + dr.ItemArray[3].ToString();
}
else
{
AddToListAccountsLogs("Please Uplaod Public Proxies");
break;
}
}
catch (Exception ex)
{
GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> Getting Public Proxy From Data Bas --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
GlobusFileHelper.AppendStringToTextfileNewLine("Error --> Getting Public Proxy From Data Base >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
}
}
else if (chkboxPrivateProxy.Checked)
{
if (ds.Tables[0].Rows.Count != 0)
{
int index = RandomNumberGenerator.GenerateRandom(0, ds.Tables[0].Rows.Count);
DataRow dr = ds.Tables[0].Rows[index];
Proxy = dr.ItemArray[0].ToString() + ":" + dr.ItemArray[1].ToString() + ":" + dr.ItemArray[2].ToString() + ":" + dr.ItemArray[3].ToString();
}
else
{
AddToListAccountsLogs("Please Upload Private Proxy");
break;
}
}
if (listUserNames.Count > 0)
{
if (counter_Username < listUserNames.Count)
{
}
else
{
AddToListAccountsLogs("*********** /n All Usernames have been taken /n ***********");
break;
}
}
else
{
AddToListAccountsLogs("Please Upload Usernames To Create Twitter Accounts");
break;
}
if (listNames.Count > 0)
{
if (counter_Name < listNames.Count)
{
//.........这里部分代码省略.........
示例5: CheckingProxies
public void CheckingProxies()
{
try
{
clsDBQueryManager Db = new clsDBQueryManager();
DataSet ds = Db.SelectPublicProxyData();
foreach (DataRow dr in ds.Tables[0].Rows)
{
ThreadPool.SetMaxThreads(25, 5);
ThreadPool.QueueUserWorkItem(new WaitCallback(ThreadPoolCheckProxies), new object[] { dr });
Thread.Sleep(1000);
}
}
catch (Exception ex)
{
GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> CheckingProxies() --> " + ex.Message, Globals.Path_ProxySettingErroLog);
GlobusFileHelper.AppendStringToTextfileNewLine("Error --> CheckingProxies() --> " + ex.Message, Globals.Path_TwtErrorLogs);
}
}
示例6: chk_RetweetAndFavoritePublicproxy_CheckedChanged
private void chk_RetweetAndFavoritePublicproxy_CheckedChanged(object sender, EventArgs e)
{
try
{
if (chk_RetweetAndFavoritePublicproxy.Checked == true)
{
ProxyUpload();
chk_RetweetAndFavoritePrivateproxy.Checked = false;
clsDBQueryManager SetDb = new clsDBQueryManager();
DataSet ds = new DataSet();
ds = SetDb.SelectPublicProxyData();
if (ds.Tables[0].Rows.Count > 0)
{
}
else
{
//MessageBox.Show("Please Import Proxy Files. We Are redirecting you to Proxy Tab");
//Tb_AccountManager.SelectedIndex = 5;
DialogResult dr = MessageBox.Show("Please Import Proxy Files. We Are redirecting you to Proxy Tab", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dr == DialogResult.Yes)
{
Tb_AccountManager.SelectedIndex = 5;
}
else
{
//do whatever you want
}
}
AddToLog_RetweetAndFavorite("[ " + DateTime.Now + " ] => [ " + ds.Tables[0].Rows.Count + " Public Proxies loaded from DataBase ]");
AddToGeneralLogs("[ " + DateTime.Now + " ] => [ " + ds.Tables[0].Rows.Count + " Public Proxies loaded from DataBase ]");
}
}
catch (Exception ex)
{
//AddToLog_RetweetAndFavorite(ex.Message);
}
}