GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: 调整目录结构,兼容Pro版(模块版) · VVeakee/SKRoot-linuxKernelRoot@3550413

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • PermissionManager
    • app/src/main/cpp
      • CMakeLists.txt
    • build_apk
      • PermissionManager.apk
  • patch_kernel_root
    • analyze
      • base_func.h
    • patch_kernel_root.cpp
  • testRoot/jni
    • kernel_root_kit/core
      • rootkit_lib_root_server_data.h
      • rootkit_simple_encryptor.h
      • rootkit_su_exec_data.h
    • su
      • su_encryptor.h
      • su_hide_path_utils.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎PermissionManager/app/src/main/cpp/CMakeLists.txt‎

Copy file name to clipboardExpand all lines: PermissionManager/app/src/main/cpp/CMakeLists.txt
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ find_library( # Sets the name of the path variable.
5050
# can link multiple libraries, such as libraries you define in this
5151
# build script, prebuilt third-party libraries, or system libraries.
5252

53+
target_include_directories(
54+
permissionmanager
55+
PRIVATE
56+
${CMAKE_CURRENT_SOURCE_DIR}/../../../../../testRoot/jni/
57+
)
58+
5359
target_link_libraries( # Specifies the target library.
5460
permissionmanager
5561

Collapse file

‎PermissionManager/build_apk/PermissionManager.apk‎

Copy file name to clipboard
-1.38 KB
Binary file not shown.
Collapse file

‎patch_kernel_root/analyze/base_func.h‎

Copy file name to clipboardExpand all lines: patch_kernel_root/analyze/base_func.h
+17-16Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@
44
#include <fstream>
55
#include <sstream>
66
#include <algorithm>
7+
#include <random>
8+
#include <chrono>
79
#include <vector>
810
#include <math.h>
9-
#define ROOT_KEY_LEN 48
10-
11-
static const char HEX[16] = {
12-
'0', '1', '2', '3',
13-
'4', '5', '6', '7',
14-
'8', '9', 'a', 'b',
15-
'c', 'd', 'e', 'f'
16-
};
1711

1812
static std::vector<char> read_file_buf(const std::string& file_path) {
1913
std::ifstream file(file_path, std::ios::binary | std::ios::ate);
@@ -28,15 +22,22 @@ static std::vector<char> read_file_buf(const std::string& file_path) {
2822
return {};
2923
}
3024

31-
static void get_rand_str(char* dest, int n) {
32-
int i, randno;
33-
char stardstring[63] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
34-
srand((unsigned)time(NULL));
35-
for (i = 0; i < n; i++) {
36-
randno = rand() % 62;
37-
*dest = stardstring[randno];
38-
dest++;
25+
static std::string generate_random_str(std::size_t len) {
26+
static constexpr char alphabet[] =
27+
"abcdefghijklmnopqrstuvwxyz"
28+
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
29+
"0123456789";
30+
static constexpr std::size_t alphabet_size = sizeof(alphabet) - 1;
31+
static std::mt19937_64 rng{
32+
static_cast<unsigned long>(std::chrono::steady_clock::now().time_since_epoch().count())
33+
};
34+
std::uniform_int_distribution<std::size_t> dist(0, alphabet_size - 1);
35+
std::string key;
36+
key.reserve(len);
37+
for (std::size_t i = 0; i < len; ++i) {
38+
key += alphabet[dist(rng)];
3939
}
40+
return key;
4041
}
4142

4243
static std::string generate_random_root_key(int root_key_len) {
Collapse file

‎patch_kernel_root/patch_kernel_root.cpp‎

Copy file name to clipboardExpand all lines: patch_kernel_root/patch_kernel_root.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ int main(int argc, char* argv[]) {
221221
std::cout << std::endl << "请选择是否需要自动随机生成ROOT密匙(1需要;2不需要):" << std::endl;
222222
std::cin >> std::dec >> is_need_create_root_key;
223223
if (is_need_create_root_key == 1) {
224-
str_root_key = generate_random_root_key(ROOT_KEY_LEN);
224+
str_root_key = generate_random_str(ROOT_KEY_LEN);
225225
} else {
226226
std::cout << "请输入ROOT密匙(48个字符的字符串,包含大小写和数字):" << std::endl;
227227
std::cin >> str_root_key;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.