无法从内存中清除winhttp变量 [英] Can't clear winhttp variables from memory

查看:170
本文介绍了无法从内存中清除winhttp变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

兄弟,



如何从WinHttp api中清除变量?



我使用codecave来打电话给winhttp api,但我想隐藏网址。我已经调用了RtlZeroMemory但是网址仍然可见...



可以使用kernel32.RtlZeroMemory清除变量吗?可以从用户模式调用kernel32.RtlZeroMemory吗?



我不知道从编解码器中清理内存。



提前感谢,



我尝试过:



 if(hConnect)
hRequest = WinHttpOpenRequest(hConnect,LPUT,
L/writetst.txt,
NULL,WINHTTP_NO_REFERER,
WINHTTP_DEFAULT_ACCEPT_TYPES,
0);

解决方案

您必须只搜索,阅读和理解HttpOpenRequest文档说:



调用应用程序完成后使用WinHttpOpenRequest返回的HINTERNET句柄后,必须使用WinHttpCloseHandle函数关闭它。



 WinHttpCloseHandle(hRequest); 
hRequest = 0 ; // 制作它清楚





我留给你自己找到关闭连接句柄。 ; - )


hi brother,

How to clean variable from WinHttp api?

I use codecave to call winhttp api but I want to hide the url. I have called RtlZeroMemory but the url is still visible...

Can Variables be cleared with kernel32.RtlZeroMemory? Can kernel32.RtlZeroMemory be called from user mode?

I have no idea to clean up memory from codecave.

thanks in advance,

What I have tried:

if (hConnect)
        hRequest = WinHttpOpenRequest( hConnect, L"PUT", 
                                       L"/writetst.txt", 
                                       NULL, WINHTTP_NO_REFERER, 
                                       WINHTTP_DEFAULT_ACCEPT_TYPES,
                                       0);

解决方案

You must only search, read and understand the in HttpOpenRequest documentation which says:

"After the calling application finishes using the HINTERNET handle returned by WinHttpOpenRequest, it must be closed using the WinHttpCloseHandle function."

WinHttpCloseHandle(hRequest);
hRequest = 0;//to make it clear



I leave it to you to find the closing of the connection handle yourself. ;-)


这篇关于无法从内存中清除winhttp变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆