汇编如何将REP STOS转换为C代码(Assembly How to convert REP STOS to C code)
我一直在调试
REP STOS DWORD PTR ES:[EDI]
一段时间从我的结论,它总是使用
ECX
作为柜台。EAX
作为将通过EDI
复制的值,然后在EDI
指向的转储后添加ECX
时间它似乎覆盖EDI上的指向数据,看起来它总是只使用ECX作为计数器,同时将EDI改为4个字节。 它在计数器达到0时停止工作
所以我想出了这种代码
while(regs.d.ecx != 0) { *(unsigned int *)(regs.d.edi) = regs.d.eax; regs.d.edi += 4; regs.d.ecx--; }
似乎工作..但我很担心,因为我只是通过运气和猜测工作。 它坚实吗? 就像它始终将
ECX
作为计数器,EAX
作为数据一样,并且始终复制4个字节永远不会更少?I been debugging
REP STOS DWORD PTR ES:[EDI]
for a while nowFrom my conclusion it always uses
ECX
as counter.EAX
as the value that will be copied overEDI
and then appendedECX
times so after putting in the pointed dump ofEDI
it seems to overwrite the pointed data at EDI with what's it seems it always only uses ECX as a counter, while changing EDI by 4 bytes. it stops working when counter hits 0
So I came up with this kind of code
while(regs.d.ecx != 0) { *(unsigned int *)(regs.d.edi) = regs.d.eax; regs.d.edi += 4; regs.d.ecx--; }
Seems to work.. but i'm concerned since I just did this by luck and guess work. Is it solid? like will it always be
ECX
as counter,EAX
as data, and it always copies 4 bytes never less?
原文:https://stackoverflow.com/questions/7763581
最满意答案
如果它们是单独的计算机,那么它就是单独的文件系统,每个都有自己的cookie文件。
但是如果你在共享存储上,那么也许使用动态文件名
'cookie-' . $_SERVER['SERVER_NAME'] . '.txt'
相反,它会给你
cookie-ComputerA.txt cookie-ComputerB.txt etc...
If they're seperate computers, then it's seperate file systems and each will have its own cookie file.
But if you're on shared storage, then use a dynamic filename, perhaps
'cookie-' . $_SERVER['SERVER_NAME'] . '.txt'
instead, which'd give you
cookie-ComputerA.txt cookie-ComputerB.txt etc...
相关问答
更多-
检查是否存在多个cookie(Check if multiple cookies exist)[2023-05-16]
您可以将两个条件组合到if语句中: if (getCookie('username') && getCookie('temp')) { $(".fancybox").trigger( "click" ); } 这将检查两个cookie是否存在。 您可以使用两个条件和介入操作符创建所需的任何逻辑组合。 You can combine two conditions into your if statement: if (getCookie('username') && getCookie('temp' ... -
您需要从赋值运算符( = )更改为连接和赋值复合运算符( += )。 如果cookie密钥存在,覆盖它也是一个好主意。 因此,我建议将cookie值转换为对象,修改它们,然后序列化为cookie字符串。 You need to change from assignment operator (=) to concatenation and assignment compound operator (+=). It would also be a good idea to overwrite the cook ...
-
ngx.header["Set-Cookie"]是一个特殊的表,每次修改它时都必须用新表重新分配(插入或删除的元素对将发送给客户端的cookie没有影响) : if type(ngx.header["Set-Cookie"]) == "table" then ngx.header["Set-Cookie"] = { "AnotherCookieValue=abc; Path=/", unpack(ngx.header["Set-Cookie"]) } else ngx.header["Set ...
-
卷曲 - 将cookie写入文件(curl - get cookies into file)[2022-09-30]
是否有权使用它执行的用户在该目录中写入文件? 如果没有收到cookie,则不会保存文件,您应该注意,当句柄关闭时,cookie会保存到文件中。 可能需要给出应保存cookie的文本文件的绝对路径,以确保知道它们的最终位置。 Does it have permission to write the file in that directory with the user that it executes as? If no cookies have been received, there will be n ... -
卷曲:多个Cookie(Curl: Multiple Cookies)[2022-12-07]
如果它们是单独的计算机,那么它就是单独的文件系统,每个都有自己的cookie文件。 但是如果你在共享存储上,那么也许使用动态文件名 'cookie-' . $_SERVER['SERVER_NAME'] . '.txt' 相反,它会给你 cookie-ComputerA.txt cookie-ComputerB.txt etc... If they're seperate computers, then it's seperate file systems and each will hav ... -
cookies参数是一个字典,其中的关键字是cookie名称,值是cookie值。 因此,尽管您的Cookie输入是Cookie字符串,但您有两种方法可将其与requests一起使用: 1)解析cookie字符串,并从它的字典,如下所示: import requests from Cookie import SimpleCookie cookie_string = options.cookie cookie = SimpleCookie(cookie_string) cookie_dict = {k: v ...
-
是的,您应该从请求中获取cookie并将其设置为响应。 HttpResponse中有魔法代码可以克隆要求的新cookie(在您的情况下可能会以某种方式进行预期),因此开发人员可以随机选择从服务器上读取cookie的位置。 在请求生命周期的早期(在响应中设置任何cookie之前)读取cookie可能更清晰,并且在响应时间设置cookie(但不能太迟,因为它必须在响应主体的第一部分刷新到客户端之前发生)。 Yes, you should get cookies from request and set them ...
-
所以简单地将条件改为|| ,你正在and比较,但你需要or : $(function() { if ($.cookie('setting7') == null || $.cookie('setting6') == null) { // client doesn't have local cookies } else { alert('client has cookies') }; }); So simple change the condition ...
-
卷曲多手柄和饼干(curl multi handle and cookies)[2022-01-10]
假设你有正确的cookie值,从文档中可以使用curl_setopt和CURLOPT_COOKIE值来为请求设置它们。 curl_setopt($curlhandle, CURLOPT_COOKIE, "Name=Value"); curl-setopt函数 所以在执行curl_copy_handle之前,只需在句柄上调用它。 (还有CURLOPT_COOKIEFILE来指定您保存的物理cookie。 我自己也没有用过这个。 presuming that you have the correct cook ... -
PHP卷曲多个饼干(php curl multiple cookies)[2022-12-17]
我不熟悉rapidshare api,但我认为这意味着cookie设置在客户端。 如果你需要让服务器执行这个动作,你可以试试这个。 curl_setopt($ch, CURLOPT_COOKIE, "CookieName=CookieValue;anotherCookieName=anotherCookieValue"); 并添加一些条件参数 if($needToUseAccount1){ curl_setopt($ch, CURLOPT_COOKIE, "cred1=data1;cred1_b=d ...