修改
This commit is contained in:
parent
68e6965bc5
commit
112398d2af
@ -6,5 +6,5 @@ Author: XYZShell
|
||||
Section: Utilities
|
||||
Tag: role::developer
|
||||
Architecture: iphoneos-arm
|
||||
Version: 0.0.7-10-70+debug
|
||||
Version: 0.0.7-10-71+debug
|
||||
Installed-Size: 1624
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -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.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
70
|
||||
71
|
||||
@ -91,9 +91,15 @@ BOOL needAdContinue(NSString *appid, NSString *idfa, NSNumber *maxEcpm) {
|
||||
|
||||
void getChangeInfo(NSString *idfa, ChangeDataSaveCallback callback, error_callback errorCallback) {
|
||||
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];
|
||||
[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];
|
||||
if (data && [data objectForKey:@"data"]) {
|
||||
NSDictionary *_data = data[@"data"];
|
||||
@ -111,8 +117,8 @@ void getChangeInfo(NSString *idfa, ChangeDataSaveCallback callback, error_callba
|
||||
if(errorCallback) {
|
||||
errorCallback(err);
|
||||
}
|
||||
}];
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
void _newgetChangeInfo(NSString *idfa, ChangeDataSaveCallback callback, error_callback errorCallback) {
|
||||
@ -143,7 +149,6 @@ void _newgetChangeInfo(NSString *idfa, ChangeDataSaveCallback callback, error_ca
|
||||
errorCallback(err);
|
||||
}
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
BOOL saveChangeDataFile(NSDictionary *data) {
|
||||
|
||||
@ -415,44 +415,37 @@ BOOL myadTaskManualStop = NO;
|
||||
tempBfaceDictKey = [[NSMutableDictionary alloc] init];
|
||||
}
|
||||
NSString *serverUrl = [[XSPhoneConfig sharedInstance] ServerURL];
|
||||
|
||||
[tempBfaceDictKey setValue:@"http://127.0.0.1:6000" forKey:@"adbrush_local_url"];
|
||||
BOOL washParam = [[XSPhoneConfig sharedInstance] WashParam];
|
||||
[tempBfaceDictKey setValue:serverUrl forKey:@"adbrush_base_url"];
|
||||
__weak typeof(self) weakSelf = self;
|
||||
getLowEcpm(^(NSNumber *lowEcpm) {
|
||||
__strong typeof(weakSelf) strongSelf = weakSelf;
|
||||
if (!strongSelf) return;
|
||||
|
||||
BOOL washParam = strongSelf->workType == 0 ? YES : NO;
|
||||
[tempBfaceDictKey setValue:@(washParam) forKey:@"washParam"];
|
||||
[tempBfaceDictKey setValue:lowEcpm forKey:@"adbrush_ecpm"];
|
||||
if(strongSelf->linkId) {
|
||||
[tempBfaceDictKey setValue:strongSelf->linkId forKey:@"linkId"];
|
||||
} else {
|
||||
NSString *linkId = [[NSUUID UUID] UUIDString];
|
||||
[tempBfaceDictKey setValue:linkId forKey:@"linkId"];
|
||||
}
|
||||
|
||||
if(strongSelf->dataId) {
|
||||
[tempBfaceDictKey setValue:strongSelf->dataId forKey:@"dataId"];
|
||||
} else {
|
||||
[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");
|
||||
NSMutableDictionary *tempAppInfo = [[NSMutableDictionary alloc] init];
|
||||
[tempAppInfo setValue:tempBfaceDictKey forKey:@"bfaceDictKey"];
|
||||
|
||||
XSClearAll(appId);
|
||||
|
||||
XSSaveAppInfo(tempAppInfo, appInfoPath);
|
||||
callback();
|
||||
});
|
||||
[tempBfaceDictKey setValue:@(washParam) forKey:@"washParam"];
|
||||
// [tempBfaceDictKey setValue:lowEcpm forKey:@"adbrush_ecpm"];
|
||||
if(self->linkId) {
|
||||
[tempBfaceDictKey setValue:self->linkId forKey:@"linkId"];
|
||||
} else {
|
||||
NSString *linkId = [[NSUUID UUID] UUIDString];
|
||||
[tempBfaceDictKey setValue:linkId forKey:@"linkId"];
|
||||
}
|
||||
|
||||
if(self->dataId) {
|
||||
[tempBfaceDictKey setValue:self->dataId forKey:@"dataId"];
|
||||
} else {
|
||||
[tempBfaceDictKey setValue:@"0" forKey:@"dataId"];
|
||||
}
|
||||
if(self->remoteIp) {
|
||||
[tempBfaceDictKey setValue:self->remoteIp forKey:@"remoteIp"];
|
||||
}
|
||||
uint16_t udp_port = [XUDPServer sharedInstance].udp_port;
|
||||
[tempBfaceDictKey setValue:@(udp_port) forKey:@"udp_port"];
|
||||
|
||||
NSLog(@"XS- resetApp 1");
|
||||
NSMutableDictionary *tempAppInfo = [[NSMutableDictionary alloc] init];
|
||||
[tempAppInfo setValue:tempBfaceDictKey forKey:@"bfaceDictKey"];
|
||||
|
||||
XSClearAll(appId);
|
||||
|
||||
XSSaveAppInfo(tempAppInfo, appInfoPath);
|
||||
callback();
|
||||
|
||||
}
|
||||
|
||||
- (NSString *)frontMostAppId {
|
||||
|
||||
13
ips.txt
13
ips.txt
@ -1,12 +1 @@
|
||||
172.29.120.31
|
||||
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
|
||||
192.168.31.103
|
||||
22
local_file.txt
Normal file
22
local_file.txt
Normal 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
62
modify_config.py
Normal 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
BIN
packages/test.deb
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user