Skip to content

Commit

Permalink
feat: 9.9.9-23159
Browse files Browse the repository at this point in the history
  • Loading branch information
msojocs committed Apr 30, 2024
1 parent 4d9ac8c commit a19f96a
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 116 deletions.
223 changes: 111 additions & 112 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,131 +4,130 @@ import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
import json from '@rollup/plugin-json'
import terser from '@rollup/plugin-terser';
import { RollupOptions } from "rollup";
import { InputPluginOption, RollupOptions } from "rollup";
import fs from 'fs'
import obfuscator from 'rollup-plugin-obfuscator';
import bytenode from 'bytenode'
import path from 'path';

const outputDir = 'program/resources/app/app_launcher/'
const options: RollupOptions[] = [
{
// 此模块用于其它平台编译字节码
input: 'src/compile.ts',
output: {
dir: outputDir,
format: 'cjs',
},
plugins: [
resolve({
// 将自定义选项传递给解析插件
moduleDirectories: ['node_modules'],
preferBuiltins: true,
}),
commonjs({
include: /node_modules/,
requireReturnsDefault: 'auto', // <---- this solves default issue
}),
typescript(),
terser(),
obfuscator({
global: true,
}),
],
// 指出哪些模块应该视为外部模块
external: ['electron', 'module', 'ntwrapper']
}, {
input: 'src/core.ts',
output: {
dir: outputDir,
format: 'cjs',
banner: (chunk) => {
// console.log('chunk:', chunk)
return fs.readFileSync('./tools/prepend.js').toString()
{
// 此模块用于其它平台编译字节码
input: 'src/compile.ts',
output: {
dir: outputDir,
format: 'cjs',
},
},
onwarn: function(warning, handler) {
// Skip certain warnings
plugins: [
resolve({
// 将自定义选项传递给解析插件
moduleDirectories: ['node_modules'],
preferBuiltins: true,
}),
commonjs({
include: /node_modules/,
requireReturnsDefault: 'auto', // <---- this solves default issue
}),
typescript(),
terser(),
obfuscator({
global: true,
}),
],
// 指出哪些模块应该视为外部模块
external: ['electron', 'module', 'ntwrapper']
}, {
input: 'src/core.ts',
output: {
dir: outputDir,
format: 'cjs',
banner: (chunk) => {
// console.log('chunk:', chunk)
return fs.readFileSync('./tools/prepend.js').toString()
},
},
onwarn: function (warning, handler) {
// Skip certain warnings

// should intercept ... but doesn't in some rollup versions
if ( warning.code === 'THIS_IS_UNDEFINED' ) { return; }
if ( warning.code === 'CIRCULAR_DEPENDENCY' ) { return; }
// should intercept ... but doesn't in some rollup versions
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
if (warning.code === 'CIRCULAR_DEPENDENCY') { return; }

// console.warn everything else
handler( warning );
},
plugins: [
resolve({
// 将自定义选项传递给解析插件
moduleDirectories: ['node_modules'],
preferBuiltins: true,
}),
commonjs({
include: /node_modules/,
requireReturnsDefault: 'auto', // <---- this solves default issue
}),
typescript(),
json(),
// 压缩
terser(),
// 混淆
obfuscator({
global: true,
}),
{
name: 'jsc',
writeBundle: (options, bundle) => {
console.log('generate jsc...')
if (bundle['core.js']) {
const core = bundle['core.js']
// console.log(options)
if (core.type === 'chunk' && options.dir) {
const fromPath = path.resolve(options.dir, './core.js')
console.log('compile file:', fromPath)
// 字节码生成
bytenode.compileFile({
filename: fromPath,
compileAsModule: true,
electron: true,
compress: true,
electronPath: process.env['PROGRAM_PATH'],
output: `${fromPath}c`,
})
// console.warn everything else
handler(warning);
},
plugins: [
resolve({
// 将自定义选项传递给解析插件
moduleDirectories: ['node_modules'],
preferBuiltins: true,
}),
commonjs({
include: /node_modules/,
requireReturnsDefault: 'auto', // <---- this solves default issue
}),
typescript(),
json(),
// 压缩
terser(),
// 混淆
obfuscator({
global: true,
}),
{
name: 'jsc',
writeBundle: (options, bundle) => {
console.log('generate jsc...')
if (bundle['core.js']) {
const core = bundle['core.js']
// console.log(options)
if (core.type === 'chunk' && options.dir) {
const fromPath = path.resolve(options.dir, './core.js')
console.log('compile file:', fromPath)
// 字节码生成
bytenode.compileFile({
filename: fromPath,
compileAsModule: true,
electron: true,
compress: true,
electronPath: process.env['PROGRAM_PATH'],
output: `${fromPath}c`,
})
}
}
}
}
}],
// 指出哪些模块应该视为外部模块
external: ['electron', 'module', 'ntwrapper', 'yukihana-native'],
},
{
input: 'src/index.ts',
output: {
dir: outputDir,
format: 'cjs',
},
],
// 指出哪些模块应该视为外部模块
external: ['electron', 'module', 'ntwrapper', 'yukihana-native'],
},
{
input: 'src/index.ts',
output: {
dir: outputDir,
format: 'cjs',
plugins: [
resolve({
// 将自定义选项传递给解析插件
moduleDirectories: ['node_modules'],
preferBuiltins: true,
}),
commonjs({
include: /node_modules/,
requireReturnsDefault: 'auto', // <---- this solves default issue
}),
typescript(),
json(),
// 压缩
terser(),
// 混淆
obfuscator({
global: true,
}),
],
// 指出哪些模块应该视为外部模块
external: ['electron', 'module', 'ntwrapper']
},
plugins: [
resolve({
// 将自定义选项传递给解析插件
moduleDirectories: ['node_modules'],
preferBuiltins: true,
}),
commonjs({
include: /node_modules/,
requireReturnsDefault: 'auto', // <---- this solves default issue
}),
typescript(),
json(),
// 压缩
terser(),
// 混淆
obfuscator({
global: true,
}),
],
// 指出哪些模块应该视为外部模块
external: ['electron', 'module', 'ntwrapper']
},
];
export default options
8 changes: 4 additions & 4 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ try {

// 核心事件hook
if (process.env['YUKIHANA_ACTION'] === 'ui') {
log.info('hook')
hook()
log.info('hookWrapper')
hookWrapper()
// log.info('hook')
// hook()
// log.info('hookWrapper')
// hookWrapper()
}

log.info('initNTQQ')
Expand Down
5 changes: 5 additions & 0 deletions yukihana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ yukihana:
sqlite3_stmt: 48895C2420564883EC20488BD933F6E8EC
# 获取方法:ida 搜索 DebugGetIPByDomain,所处函数开头
get_ip_by_domain: 40555356574154415541564157488D6C24D84881EC28010000488B0510F3
9.9.9-23159:
# ida 搜索 65F883,找有for循环的
sqlite3_stmt: 48895C2420564883EC20488BD933F6E8EC
# 获取方法:ida 搜索 DebugGetIPByDomain,所处函数开头
get_ip_by_domain: 40555356574154415541564157488D6C24D84881EC28010000488B0510F3
linux:
3.2.5-21357:
# 获取方法:ida 搜索 DebugGetIPByDomain,所处函数开头
Expand Down

0 comments on commit a19f96a

Please sign in to comment.