No to lecą źródła.
eHTTPRequest.h
#pragma once
#ifdef EHTTP_EXPORTS
#define EHTTP_API __declspec(dllexport)
#else
#define EHTTP_API __declspec(dllimport)
#endif
#include "eHTTPContent.h"
#pragma warning( disable: 4251 )
class EHTTP_API eHTTPRequest
{
public:
eHTTPRequest(void);
~eHTTPRequest(void);
void setHttpVersion(HTTP_Version httpVersion) { _httpVersion = httpVersion; }
HTTP_Version getHTTPVersion() { return _httpVersion; }
void setRequestType(RequestType requestType) { _requestType = requestType; }
RequestType getRequestType() { return _requestType; }
void setDocument(std::string document) { _document = document; }
std::string getDocument() { return _document; }
void setHost(std::string host) { _host = host; }
std::string getHost() { return _host; }
void setUserAgent(std::string userAgent) { _userAgent = userAgent; }
std::string getUserAgent() { return _userAgent; }
void setAccept(unsigned char accept) { _accept = accept; }
void setAcceptLang(std::string acceptLang) { _acceptLang = acceptLang; }
std::string getAcceptLang() { return _acceptLang; }
void setAcceptLang(unsigned char acceptLang) { _acceptLangB = acceptLang; }
void setAcceptCharset(unsigned char acceptCharset) { _acceptCharset = acceptCharset; }
void setKeepAliveTime(int keepAliveTime) { _keepAliveTime = keepAliveTime; }
int getKeepAliveTime() { return _keepAliveTime; }
void setConnection(int connection) { _connection = connection; }
void setReferer(std::string referer) { _referer = referer; }
std::string getReferer() { return _referer; }
void setContent(eHTTPContent content) { _content = content; }
std::string getRequestString();
private:
HTTP_Version _httpVersion;
RequestType _requestType;
std::string _document;
std::string _host;
std::string _userAgent;
std::string _referer;
unsigned char _accept;
std::string _acceptLang;
unsigned char _acceptLangB;
unsigned char _acceptCharset;
int _keepAliveTime;
unsigned char _connection;
eHTTPContent _content;
};
eHTTPRequest.cpp
eHTTPRequest::eHTTPRequest(void)
{
_document = "/";
_acceptCharset = VNONE;
_accept = VNONE;
_acceptLangB = VNONE;
_httpVersion = NONE;
_acceptCharset = NONE;
_acceptLang = NONE;
_requestType = (RequestType)NONE;
_host = "";
_userAgent = "";
_referer = "";
_keepAliveTime = 0;
_connection = NONE;
_content = 0;
}
..........
..........
..........
main.cpp
#include <iostream>
#include <sstream>
#include <fstream>
#include "eHTTP.h"
using namespace std;
int main()
{
eHTTPRequest req;
req.setHost("www.adres.prv.pl");
cin.get();
return 0;
}
eHTTP.h includuje eHTTPRequest.h
dla wytrwałych disassembly z zaznaczoną linijką na której się wywala
77A6F9A9 add eax,2Ch
77A6F9AC push eax
77A6F9AD push 779C8D20h
77A6F9B2 call 77A194A0
77A6F9B7 pop ecx
77A6F9B8 jmp 77A6F9C4
77A6F9BA push 779C8D18h
77A6F9BF call 77A194A0
77A6F9C4 mov eax,dword ptr [ebp+0Ch]
77A6F9C7 pop ecx
77A6F9C8 push dword ptr [eax+28h]
77A6F9CB push esi
77A6F9CC push 779CB1D6h
77A6F9D1 jmp 77A6F974
77A6F9D3 cmp dword ptr [edi+4Ch],ebx
77A6F9D6 je 77A6F9E8
77A6F9D8 mov al,byte ptr [esi+2]
77A6F9DB xor al,byte ptr [esi+1]
77A6F9DE xor al,byte ptr [esi]
77A6F9E0 mov byte ptr [esi+3],al
77A6F9E3 mov eax,dword ptr [edi+50h]
77A6F9E6 xor dword ptr [esi],eax
77A6F9E8 mov al,1
77A6F9EA pop edi
77A6F9EB pop esi
77A6F9EC pop ebx
77A6F9ED leave
77A6F9EE ret 20h
77A6F9F1 mov eax,dword ptr fs:[00000018h]
77A6F9F7 mov eax,dword ptr [eax+30h]
77A6F9FA cmp dword ptr [eax+0Ch],ebx
77A6F9FD je 77A6FA1F
77A6F9FF mov eax,dword ptr fs:[00000018h]
77A6FA05 mov eax,dword ptr [eax+30h]
77A6FA08 mov eax,dword ptr [eax+0Ch]
77A6FA0B mov eax,dword ptr [eax+0Ch]
77A6FA0E add eax,2Ch
77A6FA11 push eax
77A6FA12 push 779C8D20h
77A6FA17 call 77A194A0
77A6FA1C pop ecx
77A6FA1D jmp 77A6FA29
77A6FA1F push 779C8D18h
77A6FA24 call 77A194A0
77A6FA29 movzx eax,word ptr [esi+4]
77A6FA2D pop ecx
77A6FA2E movzx ecx,word ptr [edi+54h]
77A6FA32 xor eax,ecx
77A6FA34 push eax
77A6FA35 push esi
77A6FA36 push 779CB1A2h
77A6FA3B jmp 77A6F974
77A6FA40 push 779C8D18h
77A6FA45 call 77A194A0
77A6FA4A pop ecx
77A6FA4B push edi
77A6FA4C push dword ptr [esi+2Ch]
77A6FA4F push esi
77A6FA50 push 779CB158h
77A6FA55 call 77A194A0
77A6FA5A add esp,10h
77A6FA5D jmp 77A6F8D3
77A6FA62 mov edi,dword ptr [ebp-20h]
77A6FA65 cmp dword ptr [esi+30h],edi
77A6FA68 je 77A6F9E8
77A6FA6E mov ecx,dword ptr fs:[18h]
77A6FA75 mov ecx,dword ptr [ecx+30h]
77A6FA78 cmp dword ptr [ecx+0Ch],eax
77A6FA7B je 77A6FA9D
77A6FA7D mov eax,dword ptr fs:[00000018h]
77A6FA83 mov eax,dword ptr [eax+30h]
77A6FA86 mov eax,dword ptr [eax+0Ch]
77A6FA89 mov eax,dword ptr [eax+0Ch]
77A6FA8C add eax,2Ch
77A6FA8F push eax
77A6FA90 push 779C8D20h
77A6FA95 call 77A194A0
77A6FA9A pop ecx
77A6FA9B jmp 77A6FAA7
77A6FA9D push 779C8D18h
77A6FAA2 call 77A194A0
77A6FAA7 pop ecx
77A6FAA8 push edi
77A6FAA9 push dword ptr [esi+30h]
77A6FAAC push esi
77A6FAAD push 779CB10Eh
77A6FAB2 jmp 77A6FA55
77A6FAB4 nop
77A6FAB5 nop
77A6FAB6 nop
77A6FAB7 nop
77A6FAB8 nop
77A6FAB9 mov edi,edi
77A6FABB push ebp
77A6FABC mov ebp,esp
77A6FABE mov eax,dword ptr fs:[00000018h]
77A6FAC4 mov eax,dword ptr [eax+30h]
77A6FAC7 cmp byte ptr [eax+2],0
77A6FACB je 77A6FAE4
77A6FACD mov eax,dword ptr [ebp+8]
77A6FAD0 mov byte ptr ds:[77AA8225h],1
77A6FAD7 mov dword ptr ds:[77AA8220h],eax
77A6FADC int 3 <------------------ !!!TUTAJ SIĘ WYWALA!!! <------------------ !!!TUTAJ SIĘ WYWALA!!!
77A6FADD mov byte ptr ds:[77AA8225h],0
77A6FAE4 pop ebp
77A6FAE5 ret 4
77A6FAE8 nop
77A6FAE9 nop
77A6FAEA nop
77A6FAEB nop
77A6FAEC nop
77A6FAED mov edi,edi
77A6FAEF push ebp
77A6FAF0 mov ebp,esp
77A6FAF2 sub esp,1Ch
77A6FAF5 push esi
77A6FAF6 mov esi,dword ptr [ebp+10h]
77A6FAF9 push edi
77A6FAFA xor edi,edi
77A6FAFC cmp esi,8
77A6FAFF ja 77A6FB54
77A6FB01 mov eax,dword ptr fs:[00000018h]
77A6FB07 mov eax,dword ptr [eax+30h]
77A6FB0A cmp dword ptr [eax+0Ch],edi
77A6FB0D je 77A6FB2F
77A6FB0F mov eax,dword ptr fs:[00000018h]
77A6FB15 mov eax,dword ptr [eax+30h]
77A6FB18 mov eax,dword ptr [eax+0Ch]
77A6FB1B mov eax,dword ptr [eax+0Ch]
77A6FB1E add eax,2Ch
77A6FB21 push eax
77A6FB22 push 779C8D20h
77A6FB27 call 77A194A0
77A6FB2C pop ecx
77A6FB2D jmp 77A6FB39
77A6FB2F push 779C8D18h
77A6FB34 call 77A194A0
77A6FB39 pop ecx
77A6FB3A push esi
77A6FB3B push 779CB3AAh
77A6FB40 call 77A194A0
77A6FB45 pop ecx
77A6FB46 pop ecx
77A6FB47 push edi
77A6FB48 call 77A6FAB9
77A6FB4D xor eax,eax
77A6FB4F jmp 77A6FD43
77A6FB54 cmp esi,dword ptr [ebp+14h]
77A6FB57 jae 77A6FB9C
77A6FB59 mov eax,dword ptr fs:[00000018h]
77A6FB5F mov eax,dword ptr [eax+30h]
77A6FB62 cmp dword ptr [eax+0Ch],edi
77A6FB65 je 77A6FB87
77A6FB67 mov eax,dword ptr fs:[00000018h]
77A6FB6D mov eax,dword ptr [eax+30h]
77A6FB70 mov eax,dword ptr [eax+0Ch]
77A6FB73 mov eax,dword ptr [eax+0Ch]
77A6FB76 add eax,2Ch
77A6FB79 push eax
77A6FB7A push 779C8D20h
77A6FB7F call 77A194A0
77A6FB84 pop ecx
77A6FB85 jmp 77A6FB91
77A6FB87 push 779C8D18h
77A6FB8C call 77A194A0
77A6FB91 pop ecx
77A6FB92 push dword ptr [ebp+14h]
77A6FB95 push 779CB386h
77A6FB9A jmp 77A6FB40
77A6FB9C push ebx
77A6FB9D mov ebx,dword ptr [ebp+8]
77A6FBA0 test bl,1
77A6FBA3 je 77A6FBF2
77A6FBA5 cmp dword ptr [ebp+18h],edi
77A6FBA8 je 77A6FBF2