Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Js reverse alternative way of thinking what is the buckle code?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you js reverse alternative thinking buckle code is how, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.

For people who often analyze js, it is common for some websites to detect browser fingerprints, but it takes a lot of time and brains to analyze little by little.

The result of our deduction code is that we have to call his encryption or decryption or a certain value of the algorithm, when we deduct his algorithm to execute, normally it is no problem, but if he calculates the browser fingerprint, then basically you have no choice but to complete analysis, today we will talk about a hook hijacking. Of course, I will only talk about the principle, and you will study and figure it out for yourself.

First of all, let's introduce the features of this es6: the Proxy object is used to define the custom behavior of basic operations (such as property lookups, assignments, enumerations, function calls, etc.).

To put it simply, we can completely proxy an object, and all operations based on this object will be blocked, but its internal object operations can not be stopped, such as:

A = {b:function () {return "123"}

A = new Proxy (a, {get: function (target, key, receiver) {console.log (target, key, receiver); return target [key];}, set: function (target, key, value, receiver) {console.log (target, key, value, receiver); target [key] = value;}})

When we called a.b, we used a proxy to intercept it, but

When we: a.b.c, we find that .c does not intercept, that is because .c belongs to b objects and cannot be nested. If necessary, we can nest: for example

A = {b: {c:function () {return "123"}

A = new Proxy (a, {get:function (target, key, receiver) {console.log (target, key, receiver); if (target [key] instanceof Object) {return new Proxy (target [key], {get:function (a dint) {return a [b];}, set:function (a [b] = c) {a [b] = c }})} return target [key];}, set: function (target, key, value, receiver) {console.log (target, key, value, receiver); target [key] = value;}})

In this way, you can nest. Do you understand when you see here?

If he has a piece of code that we dig out to see if he has a fingerprint calculation, we can write it like this.

Window = {}; window = new Proxy (window, {get: function (target, key, receiver) {console.log (target, key, receiver); return target [key];}, set: function (target, key, value, receiver) {console.log (target, key, value, receiver); target [key] = value;}}); navigator= {} Navigator= new Proxy (navigator, {get: function (target, key, receiver) {console.log (target, key, receiver); return target [key];}, set: function (target, key, value, receiver) {console.log (target, key, value, receiver); target [key] = value;}})

We forge the window object, and then we will intercept all the window-based operations in it, and then deal with it. We all understand here, but let's open up a brain based on a more interesting game of proxy. Since it can intercept all operations, then we can forge a real browser environment based on this, but it is a lot of work to implement, and we can only make up for what is missing.

The above content is js reverse alternative thinking buckle code is like, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report