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

從頭再來

#

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>
            亚洲一区二区三区激情| 国产日本欧美在线观看| 狠狠88综合久久久久综合网| 亚洲第一精品久久忘忧草社区| 欧美怡红院视频| 亚洲午夜伦理| 欧美午夜a级限制福利片| 99精品欧美| 午夜在线成人av| 亚洲香蕉在线观看| 国产午夜精品理论片a级探花| 午夜在线视频观看日韩17c| 亚洲一区二区三区四区视频| 欧美伦理影院| 亚洲综合日韩中文字幕v在线| 夜夜嗨av色综合久久久综合网| 欧美视频在线观看一区| 欧美一区2区三区4区公司二百| 亚洲一区二区视频在线| 国产日韩欧美在线看| 亚洲免费在线视频| 久久精品国产2020观看福利| 亚洲国产三级网| 亚洲美女中出| 国产视频不卡| 久久成人综合网| 久热精品视频在线观看| 亚洲天堂成人在线视频| 在线视频欧美日韩精品| 国产一在线精品一区在线观看| 一区二区三区日韩精品视频| 亚洲摸下面视频| 一本综合精品| 激情视频亚洲| 一区二区三区国产精品| 一区在线观看| 亚洲最新合集| 亚洲人成77777在线观看网| 亚洲在线不卡| 在线一区欧美| 欧美成人精品1314www| 久久免费高清视频| 国产精品伦理| 99re6这里只有精品视频在线观看| 国内外成人在线| 亚洲欧美韩国| 亚洲欧美一区二区精品久久久| 欧美国产先锋| 欧美成黄导航| 狠狠网亚洲精品| 欧美与欧洲交xxxx免费观看| 午夜电影亚洲| 国产精品久久久久久亚洲毛片| 亚洲精品一区二区三区婷婷月 | 亚洲素人在线| 欧美激情综合网| 亚洲国产高清一区二区三区| 韩国亚洲精品| 久久精品成人欧美大片古装| 久久久五月婷婷| 国产在线精品自拍| 久久精品亚洲| 欧美3dxxxxhd| 亚洲国产影院| 欧美激情精品久久久久久久变态| 欧美国产日韩一区二区| 亚洲黑丝在线| 欧美日韩岛国| 亚洲天堂免费在线观看视频| 亚洲男人的天堂在线| 国产精品久久看| 午夜精彩国产免费不卡不顿大片| 久久成人免费电影| 精品51国产黑色丝袜高跟鞋| 久久一区二区三区av| 欧美激情精品久久久久久| 亚洲精品久久久久久久久久久久 | 在线亚洲免费视频| 亚洲欧美色一区| 国产一区二区精品在线观看| 久久精品国产亚洲精品| 欧美成人中文字幕在线| 99国产精品国产精品毛片| 欧美日韩在线影院| 亚洲欧美成人一区二区三区| 久久这里有精品15一区二区三区| 伊人久久亚洲美女图片| 欧美成人午夜激情| 中文亚洲欧美| 欧美jizzhd精品欧美喷水| 99国产精品久久久久久久| 国产精品香蕉在线观看| 久久夜色撩人精品| 日韩一区二区精品在线观看| 性欧美video另类hd性玩具| 极品少妇一区二区| 欧美日韩国产一区二区| 欧美综合二区| 日韩视频在线一区| 久久中文字幕一区二区三区| 一本久久知道综合久久| 国内精品久久久久久久果冻传媒 | 欧美日韩亚洲一区二| 欧美一区二区三区精品| 亚洲精品久久久久久久久久久久久| 亚洲在线一区二区三区| 亚洲国产天堂网精品网站| 国产精品久久久久久久午夜片 | 另类欧美日韩国产在线| 亚洲在线免费| 亚洲区在线播放| 久久婷婷国产综合国色天香| 亚洲视频福利| 亚洲国产精品成人一区二区 | 欧美性片在线观看| 女仆av观看一区| 久久国产精品黑丝| 亚洲中午字幕| 中文av一区特黄| 亚洲日本欧美在线| 欧美国产日韩精品| 久久综合久久综合九色| 欧美亚洲在线观看| 一区二区三区久久网| 亚洲国产va精品久久久不卡综合| 国产丝袜美腿一区二区三区| 欧美视频在线观看免费网址| 欧美激情视频给我| 欧美成人精品在线视频| 久久婷婷丁香| 久久夜色精品国产| 久久久久欧美| 久久免费观看视频| 久久久久久久久蜜桃| 久久精品成人欧美大片古装| 欧美一区二区三区在线观看 | 亚洲成人直播| 欧美黑人多人双交| 亚洲二区精品| 亚洲国产欧美精品| 亚洲国产欧美一区二区三区久久| 欧美国产欧美综合| 亚洲国产你懂的| 91久久黄色| 一区二区久久久久| 亚洲天堂成人| 欧美一区1区三区3区公司| 羞羞色国产精品| 久久久999精品免费| 久久久久国产精品麻豆ai换脸| 久久久久久9| 欧美ed2k| 欧美日韩理论| 国产欧美1区2区3区| 国产一区二区三区四区三区四| 国产在线不卡| 亚洲区国产区| 亚洲一级影院| 久久久精品tv| 亚洲国产精彩中文乱码av在线播放| 亚洲经典三级| 亚洲专区在线视频| 久久人体大胆视频| 欧美精品在线免费| 国产欧美日韩综合| 亚洲电影观看| 亚洲免费视频观看| 久久人人爽人人爽| 亚洲激情网址| 午夜一区二区三区在线观看| 久久视频免费观看| 国产精品a级| 亚洲电影在线播放| 亚洲午夜激情网站| 美国成人毛片| 一本一本久久| 久热精品视频在线观看一区| 欧美视频一区二区三区| 精品成人一区二区| 亚洲综合国产| 亚洲电影免费在线观看| 亚洲欧美成人网| 欧美激情aⅴ一区二区三区| 国产欧美一区二区三区国产幕精品| 最近中文字幕mv在线一区二区三区四区 | 中日韩午夜理伦电影免费| 久久久视频精品| 国产精品白丝黑袜喷水久久久| 亚洲第一毛片| 欧美一二三区精品| 亚洲精品在线一区二区| 久久夜色精品国产欧美乱| 国产精品视频xxxx| 夜色激情一区二区| 欧美成va人片在线观看| 亚洲欧美中文字幕| 国产精品国产一区二区| 亚洲国产一区二区三区青草影视| 久久国内精品视频| 亚洲午夜未删减在线观看|