This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString* getLocalIP() { // 获取wifi ipv4 | |
NSString* result = nil; | |
struct ifaddrs* interfaces = 0; | |
struct ifaddrs* temp_addr = 0; | |
if (0 == getifaddrs(&interfaces)) { | |
temp_addr = interfaces; | |
while(temp_addr != NULL) { | |
if(temp_addr->ifa_addr->sa_family == AF_INET) { | |
if(!strcmp(temp_addr->ifa_name, "en0")) { | |
char* ip = inet_ntoa(((struct sockaddr_in *)temp_addr->ifa_addr)->sin_addr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import frida | |
import codecs | |
import os | |
from esign.exec_tool import Logger | |
# 根目录 | |
root_dir = os.path.dirname(os.path.realpath(__file__)) | |
# js脚本目录 | |
script_dir = os.path.join(root_dir, "js/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static const char kNameKey; | |
@implementation Person (Test) | |
- (void)setName:(NSString *)name | |
{ | |
objc_setAssociatedObject(self, &kNameKey, name, OBJC_ASSOCIATION_COPY_NONATOMIC); | |
} | |
- (void)getName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 定义ANSI转义码颜色常量 | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
YELLOW='\033[0;33m' | |
CYAN='\033[0;36m' | |
NC='\033[0m' # 恢复默认颜色 | |
# 显示带颜色的文本菜单选项 | |
echo "${GREEN}请选择以下选项:${NC}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-mac-actions | |
on: [push] | |
run-name: ${{ github.actor }} is package mac app actions | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flutter_iOS | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build_ios: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func rtfDataToHtmlData(data: Data) -> Data? { | |
let attributedString = NSAttributedString(rtf: data, documentAttributes: nil)! | |
do { | |
let htmlData = try attributedString.data(from: NSRange(location: 0, length: attributedString.length), documentAttributes: [NSAttributedString.DocumentAttributeKey.documentType:NSAttributedString.DocumentType.html]) | |
return htmlData | |
} catch { | |
} | |
return nil | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)addVolumeObserver | |
{ | |
AVAudioSession *audioSession = [AVAudioSession sharedInstance]; | |
NSError *error = nil; | |
[audioSession setActive:YES error:&error]; | |
if (error) { | |
NSLog(@"%@", error); | |
} | |
[audioSession addObserver:self forKeyPath:@"outputVolume" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:NULL]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "${ACTION}" = "build" ] | |
then | |
INSTALL_DIR=${SRCROOT}/Products/${PROJECT_NAME}.framework | |
DEVICE_DIR=${BUILD_ROOT}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework | |
SIMULATOR_DIR=${BUILD_ROOT}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import json | |
g_build_sdp = "YES" | |
with open("config.json", "r+") as jsonFile: | |
data = json.load(jsonFile) | |
if g_build_sdp == "YES": | |
data["file-plugin"][1]["force"] = "true" | |
jsonFile.seek(0) # rewind |
NewerOlder