首页 \ 问答 \ 汇编如何将REP STOS转换为C代码(Assembly How to convert REP STOS to C code)

汇编如何将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 now

From my conclusion it always uses

ECX as counter. EAX as the value that will be copied over EDI and then appended ECX times so after putting in the pointed dump of EDI

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
更新时间:2022-11-03 16:11

最满意答案

如果它们是单独的计算机,那么它就是单独的文件系统,每个都有自己的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...

相关问答

更多
  • 您可以将两个条件组合到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,则不会保存文件,您应该注意,当句柄关闭时,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文件。 但是如果你在共享存储上,那么也许使用动态文件名 '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 ...
  • 假设你有正确的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 ...
  • 我不熟悉rapidshare api,但我认为这意味着cookie设置在客户端。 如果你需要让服务器执行这个动作,你可以试试这个。 curl_setopt($ch, CURLOPT_COOKIE, "CookieName=CookieValue;anotherCookieName=anotherCookieValue"); 并添加一些条件参数 if($needToUseAccount1){ curl_setopt($ch, CURLOPT_COOKIE, "cred1=data1;cred1_b=d ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。