青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

從頭再來

#

asio服務(wù)器



原來使用boost::asio 庫時(shí),基本上只用了一個(gè)io_serve   這種情況下,其實(shí)并不能把多線程的好處利用起來。 當(dāng)異步任務(wù)多的時(shí)候,集中到一個(gè)線程上去了。

這邊有網(wǎng)友貼了一個(gè)完整的asio 多線程服務(wù)器。

http://blog.sina.com.cn/s/blog_48d4cf2d0100nvei.html

粗看了一下, 服務(wù)器里面的session封裝不給力,沒有用到shared_ptr 。 多次出現(xiàn)delete .  

這個(gè)其實(shí)用智能指針,可以很方便的管理生命周期。

posted @ 2014-06-16 15:25 易寶@byhh 閱讀(182) | 評(píng)論 (0)編輯 收藏

Android 逆向

APKTool反編譯后再打包出錯(cuò)(Error retrieving parent for item: No resource found that matches the given name '@*android:style/Theme.Light')  


 看出錯(cuò)情形,是styles.xml出錯(cuò)了,因?yàn)槭亲约簩懙模源蜷_原始的XML與反編譯后的XML一對(duì)比,發(fā)現(xiàn)反編譯后的XML里<resources>/<style>parent屬性出錯(cuò)了,由原本的android:Theme.xxx變成了@*android:style/Theme.xxx,前面多出來@*,中間多出來style/,原因找到就好辦了,將這些XML改正確,再打包,成了!

http://dreamisx.blog.163.com/blog/static/1150048392012112024649308/


另外還有一些@*的不能改。 

如果報(bào)lib png 的錯(cuò)。直接打開畫圖程序一個(gè)個(gè)重新覆蓋一下就行了。 這個(gè)是體力活。

posted @ 2014-04-06 22:08 易寶@byhh 閱讀(177) | 評(píng)論 (0)編輯 收藏

Linux 服務(wù)器配置證書登陸


一、背景
項(xiàng)目需要,研究了使用ossec ,其中有一個(gè)ossec agentless的功能,可以實(shí)現(xiàn)遠(yuǎn)程的文件完整性校驗(yàn) 。為方便使用, 決定采用證書模式來處理登陸。


二、配置過程

以下直接抄了  http://praetorianprefect.com/archives/2009/11/ossec-agentless-to-save-the-day/

obsd46# sudo -u ossec ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/var/ossec/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /var/ossec/.ssh/id_rsa. Your public key has been saved in /var/ossec/.ssh/id_rsa.pub. The key fingerprint is: b8:c3:47:9a:33:09:5c:eb:54:a0:82:39:a6:06:63:08 ossec@obsd45.ptnsecurity.com   The key's randomart image is: +--[ RSA 2048]----+ |E     .          | |oo   . .         | |Bo. . . .        | |=o o . +         | |..  o + S        | |.    = *         | |      @ .        | |       =         | |                 | +-----------------+ 

Now that the SSH keys are present, we can add the host without a password. The special command line argument used with register_host.sh is NOPASS in all capitals, which will tell OSSEC supplied scripts to make use of SSH keys.

obsd46# /var/ossec/agentless/register_host.sh add root@172.17.20.20   NOPASS 

Enabling SSH key on the host to be monitored.

You will now need to securely get the contents of /var/ossec/.ssh/id_rsa.pub to 172.17.20.20.

Using SSH and the password for a single time will make this simple. This will create the /root/.ssh if it is not already created, but might throw an error as it does if the directory is already present. This is not a problem and can be ignored.

obsd46# cat /var/ossec/.ssh/id_rsa.pub | ssh root@172.17.20.20   "( mkdir /root/.ssh/;  cat - >> /root/.ssh/authorized_keys )" root@172.17.20.20  's password: mkdir: cannot create directory `/root/.ssh/': File exists obsd46# ssh root@172.17.20.20   "cat  /root/.ssh/authorized_keys " root@172.17.20.20  's password: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzyTBo7CqkI0TISR9S+KPS/gYY60nkD7Qe8wTTXrAEFvPNFJ NJJpVVKsij6zw86lvTZ6hx9ib1M+MXvt+70uF/z1hYwnYrczR2TR03Z5nwOUA9OK61nBWXVwCi9GsQs6Oeo mY9vkBDoKzB52+TKKSk9ZoC+HYPiT5SaiHZvMOV7kWuwF67lnYwlG5FdkRdOiXp7DcRjje4/Hixg7RLLl7o dEXpIakzGfalt3yQDmwvSUZhyg3OuoKimTeNiKU/jlHlmEPuDZpiQe6QhFH38EeEIZTdHsYITodl8sY+n9I eNMalGIHPs+bph+qcK+6cOb1RGaeGqJBFjaqPUyismz0bw== ossec@obsd45.ptnsecurity.com   

We can also verify that it worked with the following command.

obsd46# sudo -u ossec ssh root@172.17.20.20   The authenticity of host '172.17.20.20 (172.17.20.20)' can't be established. RSA key fingerprint is 14:cd:f2:e9:c3:5b:07:28:68:75:a7:b5:88:c2:6b:77. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '172.17.20.20' (RSA) to the list of known hosts. Last login: Tue Oct  6 12:40:05 2009 from 172.17.20.154 [linux26.ptnsecurity.com ~]# exit 

三、問題
在以上各種折騰完成后,使用root賬號(hào)已經(jīng)可以正常登陸使用了
但在使用普通賬號(hào)的mytest時(shí)卻一直失敗。 經(jīng)網(wǎng)上搜索有以下版本的信息

http://www.2cto.com/os/201206/137286.html
http://serverfault.com/questions/230771/ssh-configuration-publickeys-permission-denied-publickey-password-error 
另外還有一個(gè)網(wǎng)址一時(shí)忘記了。

中途試著將密碼鑒權(quán)關(guān)閉,直接報(bào)錯(cuò):
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).  

最終查看 /var/log/secure Authentication refused: bad ownership or modes for directory /home/mytest/.ssh

想起來我忘記的那個(gè)網(wǎng)址上有一句話: .ssh 目錄需要是 755 不能是775 。。。然后修改就搞定了!!!!完成收工。

posted @ 2014-04-01 14:20 易寶@byhh 閱讀(515) | 評(píng)論 (0)編輯 收藏

將系統(tǒng)線程與設(shè)備驅(qū)動(dòng)程序相關(guān)聯(lián)


當(dāng)設(shè)備驅(qū)動(dòng) 程序創(chuàng)建一個(gè) 系統(tǒng)線程運(yùn)行時(shí),線程運(yùn)行在system process中,任務(wù)管理器在計(jì)算cpu占用時(shí),以進(jìn)程為單位,無法確定CPU實(shí)際消耗在哪個(gè)驅(qū)動(dòng)上。


以下為一個(gè)使用的例子

1、打開cmd窗口。
2、執(zhí)行dir \\computername\c$ /s 遍歷列出c盤文件,這個(gè)list會(huì)很大,所以一直會(huì)運(yùn)行。
3、運(yùn)行process explorer ,打開system process 屬性頁面
4、切換到線程標(biāo)簽頁
5、按Cswith data 排序 ,在start address處將可以看到srv2.sys 設(shè)備驅(qū)動(dòng)。此處即表示線程對(duì)應(yīng)的驅(qū)動(dòng)程序。點(diǎn)擊module按鈕可以瀏覽驅(qū)動(dòng)文件的屬性。

posted @ 2013-08-24 23:18 易寶@byhh 閱讀(226) | 評(píng)論 (0)編輯 收藏

Failed to create snapshot. Error -3941


早上收到郵件。VDR又故障了,這次的錯(cuò)是  Failed to create snapshot. Error -3941

google了一下, VDR的知識(shí)文章還是略少了。 各種都不相關(guān)啊。

最后在官方的KB中 找到一篇看上去有點(diǎn)像的文章  http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1028924

結(jié)果
也是大失所望。居然說是磁盤超過備份限制。。。官方的文章果然各種二。


最后各種折騰,發(fā)現(xiàn)是虛擬機(jī)上直聯(lián)了一塊PCI設(shè)備。導(dǎo)致無法創(chuàng)建快照。

posted @ 2013-07-03 09:17 易寶@byhh 閱讀(1258) | 評(píng)論 (0)編輯 收藏

vSphere Data Protection 備份失敗

E100007: Miscellaneous error 
到VDP 控制臺(tái)去查看日志后 有以下結(jié)果。
avvcbimage error  12041   disk size in backup  is different than target and changed block processing was requested, restore of disk   at    failed please collect administrator log and submit a support request


原因應(yīng)當(dāng)是我修改硬盤屬性導(dǎo)致。

posted @ 2013-01-09 10:48 易寶@byhh 閱讀(518) | 評(píng)論 (0)編輯 收藏

windows 進(jìn)程 可打開的最大句柄數(shù)

以下文字摘自"Windows Internals Fifth Edition "


An object handle is an index into a process-specific handle table, pointed to by the executive
process (EPROCESS) block (described in Chapter 5). The first handle index is 4, the second
8, and so on. A process’s handle table contains pointers to all the objects that the process
has opened a handle to. Handle tables are implemented as a three-level scheme, similar
to the way that the x86 memory management unit implements virtual-to-physical address
152 Windows Internals, Fifth Edition
translation, giving a maximum of more than 16,000,000 handles per process


The test program Testlimit from Sysinternals has an option to open handles to an object
until it cannot open any more handles. You can use this to see how many handles can
be created in a single process on your system. Because handle tables are allocated from
paged pool, you might run out of paged pool before you hit the maximum number of
handles that can be created in a single process. To see how many handles you can create
on your system, follow these steps:
1. Download the Testlimit .zip file from www.microsoft.com/technet/ sysinternals, and
unzip it into a directory.
Run Process Explorer, and then click View and then System Information. Notice
the current and maximum size of paged pool. (To display the maximum pool size
values, Process Explorer must be configured properly to access the symbols for
the kernel image, Ntoskrnl.exe.) Leave this system information display running so
that you can see pool utilization when you run the Testlimit program.
3. Open a command prompt.
4. Run the Testlimit program with the -h switch (do this by typing testlimit –h).
When Testlimit fails to open a new handle, it will display the total number of
handles it was able to create. If the number is less than approximately 16 million,
you are probably running out of paged pool before hitting the theoretical perprocess
handle limit.
5. Close the Command Prompt window; doing this will kill the Testlimit process, thus
closing all the open handles.

posted @ 2012-11-07 17:26 易寶@byhh 閱讀(2624) | 評(píng)論 (0)編輯 收藏

Linux 內(nèi)存尋址 - 常規(guī)分頁

從80386開始,Intel 處理器處理 4KB的頁。


32位線性地址分為 10 10 12 三部分。 directory table offset

cr3控制寄存器中存放正使用的頁目錄的物理地址。


一個(gè)頁目錄項(xiàng)與頁表項(xiàng)結(jié)構(gòu)相同。 其中有20位Field 包含頁框的物理地址。

當(dāng)從cr3 中獲取到頁目錄地址時(shí),取線性地址的高10位取頁目錄(4KB,每一個(gè)32位占4字節(jié),共1024個(gè)頁表)中指向的頁表項(xiàng)地址(20位的Field)

使用取出來的物理地址得到頁表地址,線性地址的中間10位,取頁表內(nèi)偏移量,取含有數(shù)據(jù)的頁的物理地址。

最終使用線性地址的12位取頁內(nèi)數(shù)據(jù)偏移量。


頁目錄項(xiàng)指向的頁表中有4096的物理地址,也就是對(duì)應(yīng)1024個(gè)頁表項(xiàng),剛好與線性地址的10位相符。

而頁表項(xiàng)指向的項(xiàng)含有4096的物理地址,偏移量需要線性地址的12來取offset



cr4寄存器,PSE標(biāo)記,可使得擴(kuò)展分頁與常規(guī)分頁共存。

cr0 的PG = 0時(shí),線性地址被解析為物理地址。

posted @ 2012-04-30 20:10 易寶@byhh 閱讀(387) | 評(píng)論 (1)編輯 收藏

webkit 隨筆

How to: Set a Thread Name in Native Code

dddd

最近在分析webkit 項(xiàng)目 。

分享其中幾個(gè)tips!

一、WTF庫
WTF的詳細(xì)含義未找到出處,在webkit上找了找,大致是webkit 項(xiàng)目 繼承使用的之前的一個(gè)封裝庫。其中包涵了數(shù)值轉(zhuǎn)換,字符串,智能指針,線程管理,線程間同步等函數(shù)庫。
從源代碼的命名來看,有多種移植版本,如以下注釋 

// For portability, we do not use thread-safe statics natively supported by some compilers (e.g. gcc).
#define AtomicallyInitializedStatic(T, name) \
    WTF::lockAtomicallyInitializedStaticMutex(); \
    static T name; \
    WTF::unlockAtomicallyInitializedStaticMutex();

二、

How to: Set a Thread Name in Native Code

   MSDN的釋義是To set a thread name in your program, use the SetThreadName function

原文見:http://msdn.microsoft.com/en-us/library/xcb2z8hs(VS.90).aspx

 
 1
//
 2 // Usage: SetThreadName (-1, "MainThread");
 3 //
 4 #include <windows.h>
 5 const DWORD MS_VC_EXCEPTION=0x406D1388;
 6 
 7 #pragma pack(push,8)
 8 typedef struct tagTHREADNAME_INFO
 9 {
10    DWORD dwType; // Must be 0x1000.
11    LPCSTR szName; // Pointer to name (in user addr space).
12    DWORD dwThreadID; // Thread ID (-1=caller thread).
13    DWORD dwFlags; // Reserved for future use, must be zero.
14 } THREADNAME_INFO;
15 #pragma pack(pop)
16 
17 void SetThreadName( DWORD dwThreadID, char* threadName)
18 {
19    THREADNAME_INFO info;
20    info.dwType = 0x1000;
21    info.szName = threadName;
22    info.dwThreadID = dwThreadID;
23    info.dwFlags = 0;
24 
25    __try
26    {
27       RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info );
28    }
29    __except(EXCEPTION_EXECUTE_HANDLER)
30    {
31    }
32 }


posted @ 2012-04-28 22:32 易寶@byhh 閱讀(470) | 評(píng)論 (0)編輯 收藏

chrome 編譯

一、準(zhǔn)備編譯
   此步參照網(wǎng)絡(luò)上的文章,中文翻譯或者直接查看官網(wǎng),推薦 官網(wǎng),翻譯后的文章可能會(huì)少掉一些步驟。

二、編譯中注意事項(xiàng)

下載與安裝 DirectX SDK 這一步是必須的,否則會(huì)提示少了d3d9.h 文件以及一系列的lib文件。

i18n.cc 文件中可能有一個(gè)錯(cuò)誤

typedef BOOL( WINAPI* GetPreferredUILanguages_Fn)(DWORD, PULONG, PWZZSTR, PULONG);
這一行報(bào)錯(cuò)。 __stdcall 前缺少) ,經(jīng)查看,此函數(shù)聲明對(duì)應(yīng)一個(gè)指針數(shù)組中的函數(shù)。

第三個(gè)參數(shù)應(yīng)當(dāng)為PWSTR .修改后。base.lib 項(xiàng)目編譯通過

-- update 此處是windows SDK 7 中的函數(shù)聲明。需要更新SDK包后就編譯OK啦。

三、編譯最好選在休息時(shí)間。

夜間編譯其實(shí)也不錯(cuò),但若出問題,可能反而浪費(fèi)了時(shí)間。

posted @ 2012-04-01 21:05 易寶@byhh 閱讀(774) | 評(píng)論 (0)編輯 收藏

僅列出標(biāo)題
共3頁: 1 2 3 
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            女人色偷偷aa久久天堂| 欧美在线观看视频一区二区| av不卡免费看| 亚洲欧洲另类国产综合| 亚洲国产精品一区二区第一页| 亚洲精品久久嫩草网站秘色 | 性色av一区二区三区| 夜夜嗨网站十八久久| 一本到高清视频免费精品| 99亚洲视频| 欧美一级久久| 蜜桃av噜噜一区二区三区| 欧美成人精品激情在线观看| 欧美午夜欧美| 国产性天天综合网| 亚洲黄色成人久久久| 亚洲天堂成人在线视频| 久久精视频免费在线久久完整在线看| 久久国产精品亚洲77777| 亚洲免费在线观看视频| 激情文学一区| 国产午夜精品视频免费不卡69堂| 狠狠色丁香久久综合频道| 在线精品国产欧美| 亚洲片在线观看| 亚洲视频一区二区在线观看| 欧美在线亚洲一区| 国产伦精品一区二区三区免费| 国产日韩一区在线| 91久久黄色| 欧美在线视频二区| 亚洲国产精品99久久久久久久久| 亚洲免费精品| 久久久久9999亚洲精品| 欧美日韩综合在线| 亚洲激情国产| 男女激情久久| 性欧美xxxx大乳国产app| 欧美日韩成人综合在线一区二区| 国产主播喷水一区二区| 午夜亚洲影视| 亚洲美女免费精品视频在线观看| 另类天堂视频在线观看| 国产一区二区三区久久久| 亚洲综合国产激情另类一区| 91久久国产精品91久久性色| 久久久久久久国产| 欧美专区在线| 欧美偷拍一区二区| 亚洲国产一区二区三区在线播| 先锋亚洲精品| 99国内精品| 欧美日韩精品不卡| 亚洲看片网站| 亚洲黄网站在线观看| 久久伊人精品天天| 在线播放亚洲| 欧美激情视频一区二区三区在线播放 | 国产亚洲激情视频在线| 亚洲小说欧美另类社区| 亚洲影院免费| 91久久午夜| 欧美国产在线视频| 亚洲激情视频在线播放| 蜜月aⅴ免费一区二区三区| 性欧美videos另类喷潮| 国产精品男女猛烈高潮激情 | 欧美日韩另类国产亚洲欧美一级| 在线观看视频一区二区欧美日韩| 久久久999国产| 午夜亚洲一区| 国内成人精品一区| 久久久久久久久久久久久女国产乱 | 亚洲欧洲日本专区| 欧美国产第一页| 一本色道88久久加勒比精品 | 正在播放亚洲一区| 日韩亚洲国产精品| 欧美性色aⅴ视频一区日韩精品| 亚洲男人影院| 亚洲综合二区| 黄色成人91| 亚洲激情社区| 国产精品日韩久久久| 久久午夜电影| 欧美紧缚bdsm在线视频| 亚洲欧美日韩中文播放| 久久精品123| 日韩亚洲精品视频| 亚洲一区二区在线视频| 一区二区三区亚洲| 91久久综合| 国产亚洲欧美日韩一区二区| 欧美刺激午夜性久久久久久久| 欧美人体xx| 久久青草久久| 欧美日韩色综合| 久久综合福利| 国产精品地址| 亚洲第一色中文字幕| 国产精品手机在线| 亚洲福利精品| 国产在线拍偷自揄拍精品| 亚洲精品美女久久久久| 红桃av永久久久| 亚洲一区中文| 99ri日韩精品视频| 久久精品一区二区三区中文字幕 | 日韩一级黄色片| 又紧又大又爽精品一区二区| 夜夜精品视频一区二区| 亚洲二区三区四区| 亚洲欧美日韩网| 夜夜精品视频一区二区| 久久久久久久综合| 欧美一区二区在线| 欧美日韩成人一区| 亚洲第一在线综合在线| 国语自产精品视频在线看一大j8| 一区二区三区高清在线| 亚洲精品专区| 毛片一区二区三区| 老司机午夜精品视频| 国产精品一区二区视频| 亚洲视频在线观看免费| 亚洲婷婷综合久久一本伊一区| 欧美不卡视频一区发布| 在线欧美一区| 午夜精品久久一牛影视| 午夜激情综合网| 欧美日韩免费一区二区三区| 亚洲国产成人精品久久久国产成人一区| 国产在线精品成人一区二区三区 | 一区二区视频免费完整版观看| 亚洲午夜免费福利视频| 一本久久a久久免费精品不卡| 欧美黄色aa电影| 亚洲国产精品成人| 亚洲精品黄网在线观看| 美女脱光内衣内裤视频久久网站| 免费久久99精品国产自在现线| 一区视频在线| 久久综合影视| 亚洲国产精品999| 99v久久综合狠狠综合久久| 欧美精品日韩| 亚洲最新在线| 欧美一区二区三区在线免费观看| 国产视频久久久久| 欧美一站二站| 欧美电影打屁股sp| 亚洲精选大片| 国产精品av免费在线观看 | 老色鬼久久亚洲一区二区 | 久久久蜜桃一区二区人| 国产一区二区三区高清在线观看 | 校园激情久久| 国产区在线观看成人精品| 香蕉乱码成人久久天堂爱免费| 老牛嫩草一区二区三区日本| 亚洲人成网站精品片在线观看 | 一级成人国产| 国产精品亚洲综合久久| 欧美一区二区观看视频| 欧美大片va欧美在线播放| 一本色道久久综合狠狠躁篇怎么玩 | 欧美激情精品久久久久久大尺度 | 国产一区 二区 三区一级| 久久av一区二区三区漫画| 欧美激情综合色| 亚洲免费在线视频| 亚洲一级网站| 狂野欧美激情性xxxx欧美| 欧美剧在线免费观看网站| 亚洲视频免费观看| 久久综合电影一区| 中文av一区特黄| 影音先锋久久资源网| 欧美新色视频| 美女视频黄 久久| 亚洲综合久久久久| 亚洲电影免费观看高清完整版在线 | 欧美一区二区精品久久911| 很黄很黄激情成人| 欧美三级视频在线| 久久久综合精品| 亚洲一区亚洲二区| 亚洲国产天堂久久国产91| 久久九九热re6这里有精品 | 亚洲视频一区| 亚洲国产精品久久| 国产美女高潮久久白浆| 欧美日韩国产一级片| 久久久久国色av免费观看性色| 一片黄亚洲嫩模| 亚洲国产毛片完整版 | 亚洲一区二区三区在线看| 亚洲激情成人网| 欧美激情在线免费观看| 欧美大片网址|