This commit is contained in:
xsean 2025-11-13 14:29:24 +08:00
parent 68e6965bc5
commit 112398d2af
23 changed files with 1939 additions and 1868 deletions

View File

@ -6,5 +6,5 @@ Author: XYZShell
Section: Utilities Section: Utilities
Tag: role::developer Tag: role::developer
Architecture: iphoneos-arm Architecture: iphoneos-arm
Version: 0.0.7-10-70+debug Version: 0.0.7-10-71+debug
Installed-Size: 1624 Installed-Size: 1624

View File

@ -1 +1 @@
./packages/com.xyzshell.ioscontrol_0.0.7-10-70+debug_iphoneos-arm.deb ./packages/com.xyzshell.ioscontrol_0.0.7-10-71+debug_iphoneos-arm.deb

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
70 71

View File

@ -91,9 +91,15 @@ BOOL needAdContinue(NSString *appid, NSString *idfa, NSNumber *maxEcpm) {
void getChangeInfo(NSString *idfa, ChangeDataSaveCallback callback, error_callback errorCallback) { void getChangeInfo(NSString *idfa, ChangeDataSaveCallback callback, error_callback errorCallback) {
XSPhoneConfig *config = [XSPhoneConfig sharedInstance]; XSPhoneConfig *config = [XSPhoneConfig sharedInstance];
NSString *url = [config GetFullServerURL:[NSString stringWithFormat:@"ios/top_selection/get_change_data?id=%@&idfa=%@", [config IPhoneName], idfa ?: @""]]; NSString *url = [config GetFullServerURL:@"/ios/top_selection/get_change_data_json"];
XSHttpHelper *http = [[XSHttpHelper alloc] init]; XSHttpHelper *http = [[XSHttpHelper alloc] init];
[http doGET:url withCallback:^(NSData *jsonData) { NSDictionary *dic = @{
@"packageName": [config PackageName],
@"washParam": @([config WashParam]),
};
NSString *json = [XSHelper dic2Json:dic];
[http doPOST:url json:json withCallback:^(NSData *jsonData) {
NSDictionary *data = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; NSDictionary *data = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil];
if (data && [data objectForKey:@"data"]) { if (data && [data objectForKey:@"data"]) {
NSDictionary *_data = data[@"data"]; NSDictionary *_data = data[@"data"];
@ -111,8 +117,8 @@ void getChangeInfo(NSString *idfa, ChangeDataSaveCallback callback, error_callba
if(errorCallback) { if(errorCallback) {
errorCallback(err); errorCallback(err);
} }
}];
}];
} }
void _newgetChangeInfo(NSString *idfa, ChangeDataSaveCallback callback, error_callback errorCallback) { void _newgetChangeInfo(NSString *idfa, ChangeDataSaveCallback callback, error_callback errorCallback) {
@ -143,7 +149,6 @@ void _newgetChangeInfo(NSString *idfa, ChangeDataSaveCallback callback, error_ca
errorCallback(err); errorCallback(err);
} }
}]; }];
} }
BOOL saveChangeDataFile(NSDictionary *data) { BOOL saveChangeDataFile(NSDictionary *data) {

View File

@ -415,44 +415,37 @@ BOOL myadTaskManualStop = NO;
tempBfaceDictKey = [[NSMutableDictionary alloc] init]; tempBfaceDictKey = [[NSMutableDictionary alloc] init];
} }
NSString *serverUrl = [[XSPhoneConfig sharedInstance] ServerURL]; NSString *serverUrl = [[XSPhoneConfig sharedInstance] ServerURL];
BOOL washParam = [[XSPhoneConfig sharedInstance] WashParam];
[tempBfaceDictKey setValue:@"http://127.0.0.1:6000" forKey:@"adbrush_local_url"];
[tempBfaceDictKey setValue:serverUrl forKey:@"adbrush_base_url"]; [tempBfaceDictKey setValue:serverUrl forKey:@"adbrush_base_url"];
__weak typeof(self) weakSelf = self; [tempBfaceDictKey setValue:@(washParam) forKey:@"washParam"];
getLowEcpm(^(NSNumber *lowEcpm) { // [tempBfaceDictKey setValue:lowEcpm forKey:@"adbrush_ecpm"];
__strong typeof(weakSelf) strongSelf = weakSelf; if(self->linkId) {
if (!strongSelf) return; [tempBfaceDictKey setValue:self->linkId forKey:@"linkId"];
} else {
NSString *linkId = [[NSUUID UUID] UUIDString];
[tempBfaceDictKey setValue:linkId forKey:@"linkId"];
}
BOOL washParam = strongSelf->workType == 0 ? YES : NO; if(self->dataId) {
[tempBfaceDictKey setValue:@(washParam) forKey:@"washParam"]; [tempBfaceDictKey setValue:self->dataId forKey:@"dataId"];
[tempBfaceDictKey setValue:lowEcpm forKey:@"adbrush_ecpm"]; } else {
if(strongSelf->linkId) { [tempBfaceDictKey setValue:@"0" forKey:@"dataId"];
[tempBfaceDictKey setValue:strongSelf->linkId forKey:@"linkId"]; }
} else { if(self->remoteIp) {
NSString *linkId = [[NSUUID UUID] UUIDString]; [tempBfaceDictKey setValue:self->remoteIp forKey:@"remoteIp"];
[tempBfaceDictKey setValue:linkId forKey:@"linkId"]; }
} uint16_t udp_port = [XUDPServer sharedInstance].udp_port;
[tempBfaceDictKey setValue:@(udp_port) forKey:@"udp_port"];
if(strongSelf->dataId) { NSLog(@"XS- resetApp 1");
[tempBfaceDictKey setValue:strongSelf->dataId forKey:@"dataId"]; NSMutableDictionary *tempAppInfo = [[NSMutableDictionary alloc] init];
} else { [tempAppInfo setValue:tempBfaceDictKey forKey:@"bfaceDictKey"];
[tempBfaceDictKey setValue:@"0" forKey:@"dataId"];
}
if(strongSelf->remoteIp) {
[tempBfaceDictKey setValue:strongSelf->remoteIp forKey:@"remoteIp"];
}
uint16_t udp_port = [XUDPServer sharedInstance].udp_port;
[tempBfaceDictKey setValue:@(udp_port) forKey:@"udp_port"];
NSLog(@"XS- resetApp 1"); XSClearAll(appId);
NSMutableDictionary *tempAppInfo = [[NSMutableDictionary alloc] init];
[tempAppInfo setValue:tempBfaceDictKey forKey:@"bfaceDictKey"];
XSClearAll(appId); XSSaveAppInfo(tempAppInfo, appInfoPath);
callback();
XSSaveAppInfo(tempAppInfo, appInfoPath);
callback();
});
} }
- (NSString *)frontMostAppId { - (NSString *)frontMostAppId {

13
ips.txt
View File

@ -1,12 +1 @@
172.29.120.31 192.168.31.103
172.29.120.21
172.29.120.28
172.29.108.11
172.29.108.19
172.29.108.23
172.29.102.18
172.29.120.24
172.29.108.21
172.29.120.27
172.29.108.30
172.29.108.29

22
local_file.txt Normal file
View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IpDevName</key>
<string>wallpaper.swatch</string>
<key>MainServerURL</key>
<string>http://192.168.40.8:8080</string>
<key>PackageName</key>
<string>com.lockscreeenWidgets</string>
<key>ServerURL</key>
<string>https://nks-api.ii.explore-sun.com</string>
<key>WashParam</key>
<true/>
<key>deviceId</key>
<string>4CD1175B-A5A6-4DBA-84E0-030B696B7178</string>
<key>lastReboot</key>
<integer>1762393045</integer>
<key>senderId</key>
<integer>4294968703</integer>
</dict>
</plist>

62
modify_config.py Normal file
View File

@ -0,0 +1,62 @@
import paramiko
import os
import plistlib
# 设置SSH连接参数
# hostname = '172.30.104.18'
port = 22
username = 'root'
password = 'alpine'
# packagename = 'com.funny.prank.call'
def moveRemote(hostname:str, packagename:str,serverurl:str):
# 创建SSH传输通道
transport = paramiko.Transport((hostname, port))
transport.set_keepalive(5)
# 连接SSH服务端以用户名和密码进行认证
transport.connect(username=username, password=password)
# 创建SFTP客户端
sftp = paramiko.SFTPClient.from_transport(transport)
# 上传本地文件到远程主机
local_path = 'local_file.txt'
remote_path = '/User/OhNoData/config001.plist'
# sftp.put(local_path, remote_path)
sftp.get(remote_path, local_path)
with open(local_path, 'rb') as fp:
configPlist = plistlib.load(fp)
configPlist['IpDevName'] = packagename
configPlist['ServerURL'] = serverurl
configPlist['PackageName'] = 'com.lockscreeenWidgets'
configPlist['WashParam'] = True
configPlist['MainServerURL'] = "http://192.168.40.8:8080"
with open(local_path, 'wb') as fp:
plistlib.dump(configPlist, fp)
print(configPlist)
# 上传本地文件到远程主机
sftp.put(local_path, remote_path)
# 关闭SFTP连接
sftp.close()
# 关闭SSH传输通道
transport.close()
if __name__ == "__main__":
ips1 = []
with open("./ips.txt", 'r') as f:
ips1 = [i.strip() for i in f.readlines()]
for it in ips1:
try:
print(it)
moveRemote(it,"wallpaper.swatch", "https://nks-api.ii.explore-sun.com")
except Exception as e:
print(e)

BIN
packages/test.deb Normal file

Binary file not shown.