├── .gitignore
├── LICENSE
├── README.md
├── files
├── htdoc
│ ├── favicon.ico
│ ├── favicon.png
│ └── index.html
└── library
│ ├── arm
│ └── libtaikari.so
│ ├── arm64
│ └── libtaikari.so
│ └── jlhttp.dex
├── src
├── Android.mk
├── CMakeLists.txt
├── taikari.cpp
└── taikari.h
└── taikari.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode/
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | 616 SB License
2 |
3 | Copyright (c) 2022 TheSnowfield
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 | The person should speak loudly with "616 SB!", before using this Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
11 | Taikari X-Random-Challenge API
12 | ATTENTION! This API is for everyone, Please DO NOT abuse this service.
13 | GET /v1/generate
14 |
15 |
16 |
17 | arguments |
18 | description |
19 | optional |
20 |
21 |
22 |
23 |
24 | method |
25 | GET or POST |
26 | NO |
27 |
28 |
29 | path |
30 | request path |
31 | NO |
32 |
33 |
34 | body |
35 | post body |
36 | YES, while the method is GET |
37 |
38 |
39 |
40 | Explain
41 | Generates an X-Random-Challenge string.
42 | Return value
43 | {
44 | "status": 0,
45 | "content": {
46 | challenge: "xxxx"
47 | }
48 | }
49 |
50 | Error codes
51 |
52 |
53 |
54 | status |
55 | description |
56 |
57 |
58 |
59 |
60 | 0 |
61 | everything is OK |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/files/library/arm/libtaikari.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arcaea-Infinity/Taikari/7a7d7763a1431e55428675f295081c35de701dcf/files/library/arm/libtaikari.so
--------------------------------------------------------------------------------
/files/library/arm64/libtaikari.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arcaea-Infinity/Taikari/7a7d7763a1431e55428675f295081c35de701dcf/files/library/arm64/libtaikari.so
--------------------------------------------------------------------------------
/files/library/jlhttp.dex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arcaea-Infinity/Taikari/7a7d7763a1431e55428675f295081c35de701dcf/files/library/jlhttp.dex
--------------------------------------------------------------------------------
/src/Android.mk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Arcaea-Infinity/Taikari/7a7d7763a1431e55428675f295081c35de701dcf/src/Android.mk
--------------------------------------------------------------------------------
/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | # For more information about using CMake with Android Studio, read the
3 | # documentation: https://d.android.com/studio/projects/add-native-code.html
4 |
5 | # Sets the minimum version of CMake required to build the native library.
6 |
7 | cmake_minimum_required(VERSION 3.10.2)
8 |
9 | # Declares and names the project.
10 |
11 | project("taikari")
12 |
13 | # Creates and names a library, sets it as either STATIC
14 | # or SHARED, and provides the relative paths to its source code.
15 | # You can define multiple libraries, and CMake builds them for you.
16 | # Gradle automatically packages shared libraries with your APK.
17 |
18 | add_library( # Sets the name of the library.
19 | taikari
20 |
21 | # Sets the library as a shared library.
22 | SHARED
23 |
24 | # Provides a relative path to your source file(s).
25 | taikari.cpp )
26 |
27 | # Searches for a specified prebuilt library and stores the path as a
28 | # variable. Because CMake includes system libraries in the search path by
29 | # default, you only need to specify the name of the public NDK library
30 | # you want to add. CMake verifies that the library exists before
31 | # completing its build.
32 |
33 | find_library( # Sets the name of the path variable.
34 | log-lib
35 |
36 | # Specifies the name of the NDK library that
37 | # you want CMake to locate.
38 | log )
39 |
40 | # Specifies libraries CMake should link to your target library. You
41 | # can link multiple libraries, such as libraries you define in this
42 | # build script, prebuilt third-party libraries, or system libraries.
43 |
44 | target_link_libraries( # Specifies the target library.
45 | taikari
46 |
47 | # Links the target library to the log library
48 | # included in the NDK.
49 | ${log-lib} )
50 |
--------------------------------------------------------------------------------
/src/taikari.cpp:
--------------------------------------------------------------------------------
1 | #include "taikari.h"
2 |
3 | int64_t sendHttpRequest(online_manager_t cls, send_request_t func,
4 | const char *url, request_type_t request_type,
5 | const char *header, const char *post_body)
6 | {
7 | // check pointers
8 | if (!cls)
9 | return -100;
10 | if (!func)
11 | return -101;
12 | if (!url)
13 | return -102;
14 | if (!header)
15 | return -103;
16 | if (!post_body)
17 | return -104;
18 |
19 | // create objects
20 | auto _url = std::string(url);
21 | auto _tag_name = std::string("");
22 | auto _post_body = std::string(post_body);
23 | auto _extra_header = split(header, "\n");
24 | auto _callback = std::function