Coder Social home page Coder Social logo

qxvm's Introduction

qxVm(历史)

  • 微信公众号: y小白的笔记(https://mp.weixin.qq.com/s/GGqecHvqN54IzL3ap5c28A)
  • git: https://github.com/ylw00/qxVm
  • 基于 node16
  • 基于vm2模块纯js设计一个补环境框架
  • 没有完全补完, 主要提供思路以及壳子的设计, 剩下的就是重复性的工作,
  • 目前的设计思路以及实现的方式,检测点相对来说是比较少的
  • 因为是前期版本, 所以并没有加入dom解析,属性的方法实现
  • 内部使用弱引用, 不会影响内存回收问题
  • 优化实例产生的方式

调用方式(z_working目录)

const QXVM_GENERATE = require('../qxVm_sanbox/qxVm.sanbox');

const js_code = "function get_form (){ return '' }";  // 导出函数是一定要写的
const user_config = {  // 用户配置
    isTest: true,  // 是不是测试状态, 如果是, 则会固定时间戳, 随机数
    compress: false,  // 是否压缩js, 准对检测格式化的网站
    proxy_config: { proxy: false, proxy_proto: false, print_log: true },  // 是否挂代理
    window_attribute: {},
    env: {  // 浏览器环境
        canvas: "",
        plugin: [
            { description: "Portable Document Format", filename: "internal-pdf-viewer", name: "Chrome PDF Plugin", MimeTypes: [{ description: "Portable Document Format", suffixes: "pdf", type: "application/x-google-chrome-pdf" }] }
        ],
        navigator: {
            userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36 Edg/100.0.1185.55"
        },
        location: { },
        document: { referrer: ""}
    }
}

let result = QXVM_GENERATE.QXVm_sanbox(js_code, "get_form", user_config);
console.log(result.get_form())
  • 三个参数 (需要运行的目标js, 需要导出的目标函数, 个人配置)
  • 框架内部均有默认值, user_config为空不影响运行

自动化生成原型文件

qxVm优化方向(当然新版都是已经实现的)

  • debugger改为日志打印,加入日志开关, 并且避免使用proxy代理
  • 加入dom解析 可以套壳jsdom, 我是使用了cheerio
  • 优化堆栈替换, 防止检测堆栈
  • 加入动态更换框架内浏览器环境的逻辑, 保证框架只加载一次
  • 加入内部指纹库, 可以随意更改指纹
  • 套壳 canvas, 实现canvas指纹生成

qxVm(最新)

  • 暂时没开源
  • 框架加载速度 200ms左右
  • dom解析
  • form特性

qxvm's People

Contributors

ylw00 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.