|
|
|
[求助]向硬件端口写数据
在南桥中可以设置IO TRAP, 也就是CPU读/写(这个也可以指定是读还是写)某个IO口时,会产生SMI中断,这个中断由SMI handler去处理。 SMI handler怎么处理不得而知,一般是重启。 |
|
|
|
|
|
|
|
|
|
[讨论]我的软件被破解了,有种被强兼的感觉.
不用这样吧,好歹也是别人辛苦做的软件 |
|
|
|
[求助]用send发送登陆的http数据包登陆,那么此时登陆后的cookie怎么获取呢?
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Linq; using System.Text; using System.Web; using System.Net; using System.Runtime.InteropServices; using System.Threading; using System.IO; namespace test2 { class Program { //百度网页的编码格式为GB2312 static Encoding encoding = Encoding.GetEncoding("GB2312"); static String cookieStr;//保存cookie字符串用的 static Thread[] threadGrp; static int thread_num =10;//线程数目 static int indexer = 0; //代理索引 static int urlIndex = 0; //需要访问的链接的索引 static int normal_sleep =2000;//每次访问之后线程休眠的时间,刷得太快会被封ip static int failed_sleep =0; static int counter = 0; static int majorCounter=0;//记录总共访问了多少次 static bool ifUseProxy = false;//是否启用代理,用了代理访问速度会变慢,需要注意的是,baidu能够认出普通的代理 static void Main(string[] args) { //从文件中获取上一次的session cookie或者重新获取session cookie FileStream fs = new FileStream("C:\\ss.txt",FileMode.OpenOrCreate); if (fs.Length>0) { //如果文件是空或者没有文件,则重新获取session cookie StreamReader sr = new StreamReader(fs); cookieStr = sr.ReadToEnd(); //将新的cookie写到文件中,这样做的目的是不必每次启动程序就去登录获取cookie,次数多了之后,会需要验证码 //程序还没有实现验证码识别 Console.WriteLine("Get Session from file:\n" + cookieStr); sr.Close(); fs.Close(); } else { //从文件中直接获取上次的cookie StreamWriter sw = new StreamWriter(fs); cookieStr = getSession(); Console.WriteLine("Get new Session:\n" + cookieStr); sw.Write(cookieStr); sw.Close(); fs.Close(); } //线程的初始化 threadGrp = new Thread[thread_num]; for (int i = 0; i < thread_num; i++) { threadGrp[i] = new Thread(new ThreadStart(ThreadProc)); threadGrp[i].Start(); } //线程一直运行 for (int i = 0; i < thread_num; i++) { threadGrp[i].Join(Timeout.Infinite); } } /// <summary> /// 访问线程 /// </summary> static void ThreadProc() { while (true) { //获取要访问的url if (urlIndex >= urlList.Length) urlIndex = 0; int localUrlIndex = urlIndex++; int localMajorCounter = majorCounter++; //获取代理 if (indexer >= ipList.Length) indexer = 0; String proxy_url = ipList[indexer++]; String vUrl = urlList[localUrlIndex]; try { //代理 WebProxy wp = new WebProxy(); if (ifUseProxy) wp.Address = new Uri("http://" + proxy_url, UriKind.Absolute); else { wp = null; proxy_url = "no proxy"; } Console.WriteLine("urlIndex:" + localUrlIndex + "--" + visitUrl(vUrl, wp, cookieStr) + "---" + localMajorCounter + "--" + proxy_url); counter++; } catch (Exception ex) { Console.WriteLine("urlIndex:" + localUrlIndex + "--failed----" + proxy_url); Console.Beep(1000, 10); Thread.Sleep(failed_sleep); } //休眠 Thread.Sleep(normal_sleep); } } static String visitUrl(String url, WebProxy wbp,String cookieStr) { HttpWebResponse resp=null; try { HttpWebRequest hwr = (HttpWebRequest)WebRequest.Create(url); hwr.KeepAlive = false; hwr.Timeout = 5000; hwr.Method = "GET"; hwr.Proxy = wbp; //添加cookie,需要cookie操作才会生效 hwr.Headers.Add(HttpRequestHeader.Cookie, cookieStr); resp = (HttpWebResponse)hwr.GetResponse(); if (resp.StatusCode == HttpStatusCode.OK) { return "ok"; } else return "error"; } catch (Exception ex) { throw (ex); } finally { if (resp != null) resp.Close(); } } static String getSession() { //链接到登录链接获取会话cookie //下面这里改成你的密码 String loginUrl = "http://passport.baidu.com/?login&username=quicker1&password=***&mem_pass=1"; HttpWebRequest hwr = (HttpWebRequest)WebRequest.Create(loginUrl); CookieContainer ck = new CookieContainer(); hwr.CookieContainer = ck; HttpWebResponse resp = null; try { resp = (HttpWebResponse)hwr.GetResponse(); if (resp.StatusCode == HttpStatusCode.OK) { return ck.GetCookieHeader(new Uri("http://www.baidu.com")); } else return "error"; } catch (Exception ex) { return "error"; } } //代理 static String[] ipList = new String[] {"62.116.163.221:80", /*"way-cache.cache.telstra.net",*/ /*"wel-cache.cache.telstra.net",*/ /* "67.69.254.247:80",*/ "58.227.194.87:8080", "200.206.46.178:3128", "222.251.133.59:8080", "66.198.41.11:3128", /* "203.162.183.222:80",*/ "200.51.41.29:8080" }; //url链接 static String[] urlList = new String[]{"http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011", "http://tieba.baidu.com/f?kz=488742011" /* "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4855029380&rs5=2566640443&rs6=699254329", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4861926426&rs5=2526935261&rs6=688662754", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4861927273&rs5=2563697529&rs6=711733387", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4861981695&rs5=2595998963&rs6=855062725", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4861980899&rs5=2626507173&rs6=879515016", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4861980141&rs5=2464481818&rs6=747027366", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4861992874&rs5=2596957230&rs6=875513198", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4861991861&rs5=2544832356&rs6=858427489", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4861991160&rs5=2502710187&rs6=783159987", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4861989942&rs5=2638347912&rs6=860318259", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4862537395&rs5=2606063447&rs6=736172888", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4862536028&rs5=2522080370&rs6=642131497", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4862534930&rs5=2478264039&rs6=726966229", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4862531644&rs5=2468432760&rs6=701880288", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4862528721&rs5=2512750996&rs6=694250489", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4863341986&rs5=2558087612&rs6=784727635", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4863340081&rs5=2457239537&rs6=678896336", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4863325425&rs5=2492746799&rs6=654977541", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4863339063&rs5=2568871766&rs6=674937449", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4863337309&rs5=2537381625&rs6=654999945", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4863324275&rs5=2527607725&rs6=676785280", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4863173705&rs5=2488523109&rs6=724718179", "http://tieba.baidu.com/f?ct=369098752&cm=39&tn=baiduManagerSubmit&word=%CB%E6%BB%FA&lm=1017580&z=483983646&sc=4863020918&rs5=2439099200&rs6=659471219" */ }; } } |
|
|
|
|
|
[讨论]VC静态库中的__stdcall函数名如何让它没有_前缀及@后缀
没有啊,BCC里面也是一样的。 |
|
对windows NT tss的困惑
那是不可能滴。。。。 |
|
|
|
|
|
[原创]MTK 手机BIN文件加密的一点心得
光怪陆离啊,呵呵。 下了本指令集看了看。ARM的指令集比较简单,但是ARM的工作方式没实践过比较难理解啊。 同一段代码里面有32位的代码,还有16位的代码。 还可以切换指令集,这个就很难理解了。为什么要切换到那个什么thumb指令集呢? 另外, 如果我修改Read_CPU_ID这个函数,让他每次都返回相同的CPUID呢。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值