├── .gitattributes
├── .gitignore
├── README.md
└── src
├── lib
└── appstore_core.exp
├── shellcode.v12.suo
├── src
├── appstore
│ ├── appstore.cc
│ ├── appstore.vcxproj
│ ├── appstore.vcxproj.filters
│ └── appstore.vcxproj.user
├── appstore_core
│ ├── appstore_core.vcxproj
│ ├── appstore_core.vcxproj.filters
│ ├── appstore_core.vcxproj.user
│ ├── appstore_core_main.cc
│ ├── appstore_core_main.h
│ ├── appstore_http_protocol.cc
│ ├── appstore_http_protocol.h
│ ├── basictypes.h
│ ├── dllexport.h
│ ├── dllmain.cc
│ └── strings.h
├── third_party
│ ├── cookies
│ │ ├── OWNERS
│ │ ├── canonical_cookie.cc
│ │ ├── canonical_cookie.h
│ │ ├── canonical_cookie_unittest.cc
│ │ ├── cookie_constants.cc
│ │ ├── cookie_constants.h
│ │ ├── cookie_constants_unittest.cc
│ │ ├── cookie_monster.cc
│ │ ├── cookie_monster.h
│ │ ├── cookie_monster_perftest.cc
│ │ ├── cookie_monster_store_test.cc
│ │ ├── cookie_monster_store_test.h
│ │ ├── cookie_monster_unittest.cc
│ │ ├── cookie_options.h
│ │ ├── cookie_store.cc
│ │ ├── cookie_store.h
│ │ ├── cookie_store_test_callbacks.cc
│ │ ├── cookie_store_test_callbacks.h
│ │ ├── cookie_store_test_helpers.cc
│ │ ├── cookie_store_test_helpers.h
│ │ ├── cookie_store_unittest.h
│ │ ├── cookie_util.cc
│ │ ├── cookie_util.h
│ │ ├── cookie_util_unittest.cc
│ │ ├── parsed_cookie.cc
│ │ ├── parsed_cookie.h
│ │ └── parsed_cookie_unittest.cc
│ ├── glog
│ │ ├── basictypes.h
│ │ ├── logging.cc
│ │ ├── logging.h
│ │ └── scoped_ptr.h
│ └── openssl
│ │ ├── aes.h
│ │ ├── asn1.h
│ │ ├── asn1_mac.h
│ │ ├── asn1t.h
│ │ ├── bio.h
│ │ ├── blowfish.h
│ │ ├── bn.h
│ │ ├── buffer.h
│ │ ├── camellia.h
│ │ ├── cast.h
│ │ ├── cmac.h
│ │ ├── cms.h
│ │ ├── comp.h
│ │ ├── conf.h
│ │ ├── conf_api.h
│ │ ├── crypto.h
│ │ ├── des.h
│ │ ├── des_old.h
│ │ ├── dh.h
│ │ ├── dsa.h
│ │ ├── dso.h
│ │ ├── dtls1.h
│ │ ├── e_os2.h
│ │ ├── ebcdic.h
│ │ ├── ec.h
│ │ ├── ecdh.h
│ │ ├── ecdsa.h
│ │ ├── engine.h
│ │ ├── err.h
│ │ ├── evp.h
│ │ ├── hmac.h
│ │ ├── idea.h
│ │ ├── krb5_asn.h
│ │ ├── kssl.h
│ │ ├── lhash.h
│ │ ├── md4.h
│ │ ├── md5.h
│ │ ├── mdc2.h
│ │ ├── modes.h
│ │ ├── obj_mac.h
│ │ ├── objects.h
│ │ ├── ocsp.h
│ │ ├── opensslconf.h
│ │ ├── opensslv.h
│ │ ├── ossl_typ.h
│ │ ├── pem.h
│ │ ├── pem2.h
│ │ ├── pkcs12.h
│ │ ├── pkcs7.h
│ │ ├── pqueue.h
│ │ ├── rand.h
│ │ ├── rc2.h
│ │ ├── rc4.h
│ │ ├── ripemd.h
│ │ ├── rsa.h
│ │ ├── safestack.h
│ │ ├── seed.h
│ │ ├── sha.h
│ │ ├── srp.h
│ │ ├── srtp.h
│ │ ├── ssl.h
│ │ ├── ssl2.h
│ │ ├── ssl23.h
│ │ ├── ssl3.h
│ │ ├── stack.h
│ │ ├── symhacks.h
│ │ ├── tls1.h
│ │ ├── ts.h
│ │ ├── txt_db.h
│ │ ├── ui.h
│ │ ├── ui_compat.h
│ │ ├── whrlpool.h
│ │ ├── x509.h
│ │ ├── x509_vfy.h
│ │ └── x509v3.h
└── win_itunes
│ ├── itunes_client_interface.cc
│ ├── itunes_client_interface.h
│ ├── itunes_cookie_interface.cc
│ ├── itunes_cookie_interface.h
│ ├── itunes_download_info.cc
│ ├── itunes_download_info.h
│ ├── itunes_https.cc
│ ├── itunes_https.h
│ ├── itunes_https_configure.cc
│ ├── itunes_https_configure.h
│ ├── itunes_internal_interface.h
│ ├── itunes_module.cc
│ ├── itunes_module.h
│ ├── itunes_module_state.cc
│ ├── itunes_module_state.h
│ ├── itunes_native_interface.cc
│ ├── itunes_native_interface.h
│ ├── strings.cc
│ ├── strings.h
│ ├── windows_hardware.cc
│ ├── windows_hardware.h
│ ├── windows_version.cc
│ └── windows_version.h
├── vc.sln
└── vc.v12.suo
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Compiled Object files
5 | *.slo
6 | *.lo
7 | *.o
8 | *.obj
9 |
10 | # Precompiled Headers
11 | *.gch
12 | *.pch
13 |
14 | # Compiled Dynamic libraries
15 | *.so
16 | *.dylib
17 | *.dll
18 |
19 | # Fortran module files
20 | *.mod
21 | *.smod
22 |
23 | # Compiled Static libraries
24 | *.lai
25 | *.la
26 | *.a
27 | *.lib
28 |
29 | # Executables
30 | *.exe
31 | *.out
32 | *.app
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Get at least $100 to answer some of your questions and assist you. I am poor, sorry.
2 |
3 |
--------------------------------------------------------------------------------
/src/lib/appstore_core.exp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cxxrev0to1dev/apple_itunes_win/8530985b4c8747af125707a6604c996aa6c9c916/src/lib/appstore_core.exp
--------------------------------------------------------------------------------
/src/shellcode.v12.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cxxrev0to1dev/apple_itunes_win/8530985b4c8747af125707a6604c996aa6c9c916/src/shellcode.v12.suo
--------------------------------------------------------------------------------
/src/src/appstore/appstore.cc:
--------------------------------------------------------------------------------
1 | #include
2 | #include "appstore_core/appstore_core_main.h"
3 | #pragma comment(lib,"appstore_core.lib")
4 |
5 | int wmain(int argc, wchar_t* argv[]){
6 | AppstoreCore::AppstoreCoreMain* appstore = new AppstoreCore::AppstoreCoreMain;
7 | appstore->SendAuthenticate("m", "");
8 | appstore->SendBuy("");
9 | return 0;
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/src/src/appstore/appstore.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {1e8ec46e-6024-4692-a4fa-34ce6ec978fc}
6 |
7 |
8 |
9 |
10 | src
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/src/appstore/appstore.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/src/appstore_core/appstore_core.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/src/appstore_core/appstore_core_main.cc:
--------------------------------------------------------------------------------
1 | #include "appstore_core/appstore_core_main.h"
2 | #include "win_itunes/itunes_client_interface.h"
3 | #include "win_itunes/windows_hardware.h"
4 | #include "win_itunes/itunes_download_info.h"
5 |
6 | namespace AppstoreCore{
7 | win_itunes::communicates *communicates = win_itunes::communicates::singleton();
8 | AppstoreCoreMain::AppstoreCoreMain(){
9 | communicates->ResetSapSetup(true);
10 | return;
11 | }
12 | bool AppstoreCoreMain::SendAuthenticate(const char* username, const char* password){
13 | win_itunes::HardwareInfo hardware;
14 | //"DengTao", "128dba73ccf589225c29ad2c623da34f5521b1bd"
15 | return communicates->Authenticate(username, password, hardware.GetMachineName().c_str(), hardware.cookie().c_str());
16 | }
17 | bool AppstoreCoreMain::SendBuy(const char* appid){
18 | win_itunes::HardwareInfo hardware;
19 | communicates->SendMessage_buyProduct(appid, hardware.GetMachineName().c_str(), hardware.cookie().c_str(), win_itunes::iTunesDownloadInfo::GetInterface(), 0, true);
20 | return true;
21 | }
22 | }
--------------------------------------------------------------------------------
/src/src/appstore_core/appstore_core_main.h:
--------------------------------------------------------------------------------
1 | #ifndef APPSTORE_CORE_APPSTORE_CORE_MAIN_H_
2 | #define APPSTORE_CORE_APPSTORE_CORE_MAIN_H_
3 |
4 | #include "appstore_core/dllexport.h"
5 |
6 | namespace AppstoreCore{
7 | class AppstoreCoreMain {
8 | public:
9 | APPSTORE_CORE_API AppstoreCoreMain(void);
10 | APPSTORE_CORE_API bool SendAuthenticate(const char* username, const char* password);
11 | APPSTORE_CORE_API bool SendBuy(const char* appid);
12 | };
13 | }
14 |
15 | #endif
--------------------------------------------------------------------------------
/src/src/appstore_core/appstore_http_protocol.cc:
--------------------------------------------------------------------------------
1 | #include "appstore_core/appstore_http_protocol.h"
2 |
3 | namespace AppstoreCore{
4 | AppstoreHTTPProtocol::AppstoreHTTPProtocol(){
5 | common_headers_.resize(0);
6 | content_type_.resize(0);
7 | set_x_apple_actionsignature(nullptr);
8 | set_cookies(nullptr);
9 | }
10 | AppstoreHTTPProtocol::~AppstoreHTTPProtocol(){
11 | common_headers_.resize(0);
12 | content_type_.resize(0);
13 | set_x_apple_actionsignature(nullptr);
14 | set_cookies(nullptr);
15 | }
16 | void AppstoreHTTPProtocol::reset_common_headers(){
17 | common_headers_.resize(0);
18 | common_headers_.append(L"X-Apple-Client-Versions: GameCenter/2.0\r\n");
19 | common_headers_.append(L"Accept: */*\r\n");
20 | common_headers_.append(L"X-Apple-Store-Front: 143465-19,26\r\n");
21 | common_headers_.append(L"X-Apple-Partner: origin.0\r\n");
22 | common_headers_.append(L"Accept-Encoding: gzip, deflate\r\n");
23 | common_headers_.append(L"Accept-Language: zh-Hans\r\n");
24 | common_headers_.append(L"User-Agent: com.apple.Preferences/1 iOS/8.1.2 model/iPhone6,1 build/12B440 (6; dt:89)\r\n");
25 | common_headers_.append(L"X-Apple-Connection-Type: WiFi\r\n");
26 | common_headers_.append(L"Connection: keep-alive\r\n");
27 | }
28 | void AppstoreHTTPProtocol::set_content_type(const wchar_t* default_plist){
29 | content_type_.resize(0);
30 | if (default_plist == nullptr)
31 | content_type_.append(L"Content-Type: application/x-apple-plist\r\n");
32 | else{
33 | content_type_.append(L"Content-Type: ");
34 | content_type_.append(default_plist);
35 | content_type_.append(L"\r\n");
36 | }
37 | }
38 | void AppstoreHTTPProtocol::set_x_apple_actionsignature(const wchar_t* x_apple_actionsignature){
39 | x_apple_actionsignature_.resize(0);
40 | if (x_apple_actionsignature != nullptr){
41 | x_apple_actionsignature_.append(L"X-Apple-ActionSignature: ");
42 | x_apple_actionsignature_.append(x_apple_actionsignature);
43 | x_apple_actionsignature_.append(L"\r\n");
44 | }
45 | }
46 | void AppstoreHTTPProtocol::set_cookies(const wchar_t* cookies){
47 | cookies_.resize(0);
48 | if (cookies != nullptr){
49 | cookies_.append(L"Cookie: ");
50 | cookies_.append(cookies);
51 | cookies_.append(L"\r\n");
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/src/appstore_core/appstore_http_protocol.h:
--------------------------------------------------------------------------------
1 | #ifndef APPSTORE_CORE_APPSTORE_HTTP_PROTOCOL_H_
2 | #define APPSTORE_CORE_APPSTORE_HTTP_PROTOCOL_H_
3 |
4 | #include
5 | #include "appstore_core/dllexport.h"
6 |
7 | namespace AppstoreCore{
8 | class AppstoreHTTPProtocol {
9 | public:
10 | AppstoreHTTPProtocol();
11 | ~AppstoreHTTPProtocol();
12 | void reset_common_headers();
13 | void set_content_type(const wchar_t* default_plist);
14 | void set_x_apple_actionsignature(const wchar_t* x_apple_actionsignature);
15 | void set_cookies(const wchar_t* cookies);
16 | private:
17 | std::wstring common_headers_;
18 | std::wstring content_type_;
19 | std::wstring x_apple_actionsignature_;
20 | std::wstring cookies_;
21 | };
22 | }
23 |
24 | #endif
--------------------------------------------------------------------------------
/src/src/appstore_core/basictypes.h:
--------------------------------------------------------------------------------
1 | #ifndef PASSPORT_BASICTYPES_H_
2 | #define PASSPORT_BASICTYPES_H_
3 | //////////////////////////////////////////////////////////////////////////
4 | #define _ATL_NOFORCE_MANIFEST
5 | #define _STL_NOFORCE_MANIFEST
6 | #define _CRT_NOFORCE_MANIFEST
7 | #define _ATL_APARTMENT_THREADED
8 | #define _ATL_NO_AUTOMATIC_NAMESPACE
9 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
10 | #define _ATL_ALL_WARNINGS
11 | #define WIN32_LEAN_AND_MEAN
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include
25 | #pragma comment(lib,"IPHLPAPI.lib")
26 | #pragma comment(lib,"Shell32.lib")
27 | #pragma comment(lib,"Ole32.lib")
28 | #pragma comment(lib,"Shlwapi.lib")
29 | #pragma comment(lib,"user32.lib")
30 | #pragma comment(lib,"gdi32.lib")
31 | #pragma comment(lib,"Advapi32.lib")
32 | #pragma comment(lib,"WinMM.lib")
33 | #pragma comment(lib,"Psapi.lib")
34 | #pragma comment(lib,"ws2_32.lib")
35 | #pragma comment(lib,"Winhttp.lib")
36 | #pragma comment(lib,"comctl32.lib")
37 | #pragma warning(disable:4702)
38 | #pragma warning(disable:4201)
39 | #include
40 | #include
41 | #include