VC settings cookies to achieve file brush Download volume
VC Settings cookies to achieve file brush Download VolumeCategory:2013-10-11 17:22 250 people reading reviews (0) favorite reports
Directory (?) [+]
Classmate XXX Questions:
Hello everyone, our Android app has been successfully listed in ZTE World, open the "ZTE World App Store" http://apps.ztems.com/, search bar search "Rui Cloud" can be found, but you need to register a store account, you can download after the completion of the , you can also give us a comment. The simplest brush download volume please directly click http://dl5.ztems.com/tmpfile/cst2009/2009001/appSoft/2013/10/9/ruiyun.apk (test can download, cannot increase the download volume)
Both of the above methods can be, the first better, the second can also. But in the free time we still recommend the first kind. XXX Here thank you for your help.
--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------
Similar to the app download site, is not to verify the IP, not to verify the Mac, to achieve just let a client download once. (Authentication IP, we can use proxy IP to achieve the purpose of our brush download volume)
Impersonate a login and see how the server handles user requests.
Using the capture software to monitor:
[Plain]View Plaincopy
- POST/STOREUSERBASICFACADE/LOGIN.SSM http/1.1
- Host:apps.ztems.com
- Connection:keep-alive
- content-length:72
- Origin:http://apps.ztems.com
- user-agent:mozilla/5.0 (Windows NT 6.2; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/30.0.1599.69 safari/537.36
- Content-type:text/plain;charset=utf-8
- Accept: */*
- Referer:http://apps.ztems.com/newlogin.html
- Accept-encoding:gzip,deflate,sdch
- accept-language:zh-cn,zh;q=0.8
- cookie:jsessionid=811b619fa8744978b07238a82f1e6a8b.app42-1; zte_store_view=4028329f417e6dcd01419d5dafa21aa3-1131011170551%2c
- [{"Email": "******", "userpasswd": "* * *", "Checkcode": "3367"}]
Http://apps.ztems.com/newLogin.html
/storeuserbasicfacade/login.ssm
This kind of thing does not know how to deal with it because of the limited level, so we start with the cookies.
With cookies we can easily get around the background and log in.
Then use VC to achieve the above operation, using the win API
InternetSetCookie
Syntaxc++
BOOL InternetSetCookie ( _in_ lpctstr lpszurl, _in_ lpctstr lpszcookiename, _in_ lpctstr lpszcookiedata);
Parameters
-
Lpszurl [In]
-
Pointer to a null-terminated string, specifies the URL for which the cookie should is set.
-
Lpszcookiename [In]
-
Pointer to a null-terminated string, specifies the name to is associated with the cookie data. If This parameter are NULL, no name is associated with the cookie.
-
Lpszcookiedata [In]
-
Pointer to the actual data to is associated with the URL.
Return value
Returns TRUE If successful, or FALSE otherwise. To get a specific error message, call GetLastError.
Remarks
Cookies created by InternetSetCookie without a expiration date is stored in memory and is available only in th E same process that created them. The Cookies include an expiration date is stored in the Windows\Cookies directory.
Creating a new cookie might cause a dialog box to appear on the screens asking the user if they want to allow or disallow C Ookies from this site based on the privacy settings for the user.
Caution InternetSetCookie would unconditionally create a cookie even if "Block all Cookies" are set in Internet Ex Plorer. This behavior can viewed as a breach of privacy even though such cookies is not subsequently sent back to servers Whil E The ' Block All Cookies ' setting is active. Applications should use Internetsetcookieex to correctly honor the user ' s privacy settings.
For more cookies internals, see http://blogs.msdn.com/ieinternals/archive/2009/08/20/WinINET-IE-Cookie-Internals-FAQ.aspx.
Aspects of the WinINet API, this function cannot is safely called from within DllMain or the constructors a nd destructors of global objects.
Note WinINet does not a support server implementations. In addition, it should is used from a service. For server implementations or services, use Microsoft Windows HTTP Services (WinHTTP).
[CPP]View Plaincopy
- #include <iostream>
- #include <cstdio>
- #include <afxinet.h>
- Using namespace std;
- CString gethtml (CString URL)
- {
- CString content;
- CString data;
- DWORD Dwstatuscode;
- CInternetSession session (TEXT ("HttpClient"));
- chttpfile* pfile = (CHttpFile *) session. OpenURL (URL);
- Pfile->queryinfostatuscode (Dwstatuscode);
- if (Dwstatuscode = = HTTP_STATUS_OK)
- {
- While (pfile->readstring (data))
- {
- Content + = data;
- }
- }
- Pfile->close ();
- Delete pfile;
- Session. Close ();
- return content;
- }
- int main ()
- {
- CString url = "Http://apps.ztems.com/fdpc?appcode=4028329f417e6dcd01419d5dafa21aa3";
- InternetSetCookie (URL, NULL, TEXT ("jsessionid=811b619fa8744978b07238a82f1e6a8b.app42-1; zte_store_view=;expires=sat,01-jan-2014 00:00:00gmt "));
- gethtml (URL);
- }
VC settings cookies to achieve file brush Download volume