|
Awesomium замена user agent Random
|
|||
---|---|---|---|
#18+
доброй ночи! есть вопрос как посредством нажатие кнопки менять user agent мой код ) но он не работает как переделать? спасибо заранее!!! using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Awesomium.Core; namespace client_r1 { public partial class Form1 : Form { Random r = new Random(); string[] arrUA; public Form1() { arrUA = new string[]{ "Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", "Mozilla/5.0 (Linux; U; Android 4.0.3; de-ch; HTC Sensation Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", "Mozilla/5.0 (Linux; U; Android 2.3; en-us) AppleWebKit/999+ (KHTML, like Gecko) Safari/999.9", }; WebCore.Initialize(new WebConfig() { UserAgent = arrUA[new Random().Next(0, arrUA.Length)] }); WebPreferences wp = new WebPreferences(); wp.AcceptLanguage = "ru,en;q=0.8"; WebSession ws = WebCore.CreateWebSession(wp); InitializeComponent(); webControl1.WebSession = ws; } private void button1_Click(object sender, EventArgs e) { webControl1.Source = new Uri(textBox1.Text); } } } Модератор: Тема перенесена из форума "C++". ... |
|||
:
Нравится:
Не нравится:
|
|||
13.08.2015, 22:03 |
|
|
start [/forum/topic.php?fid=20&gotonew=1&tid=1401289]: |
0ms |
get settings: |
9ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
41ms |
get topic data: |
12ms |
get first new msg: |
8ms |
get forum data: |
3ms |
get page messages: |
33ms |
get tp. blocked users: |
1ms |
others: | 327ms |
total: | 454ms |
0 / 0 |