current position:Home>How to use debugger to block TA people to view your interface and how to crack debugger interception?
How to use debugger to block TA people to view your interface and how to crack debugger interception?
2021-08-27 00:14:56 【Hello harpy】
This is my participation 8 The fourth of the yuegengwen challenge 3 God , Check out the activity details : 8 Yuegengwen challenge
People go high , The water flows down
demand
Recently, the leader saw a thing that seems to be very powerful , So I sent a screenshot in the group , Then we want as like as two peas , The effect is as follows :
When the user clicks F12, A breakpoint appears on the page , Then click to display a blank page , It's that simple ?
Ideas
- Here you can see , Is the use debugger To complete , As for how to use debugger It's finished ? Just write it directly in the code ? How to monitor whether the user has turned on debugging mode ? Put... Directly debugger Will writing to the code cause our web page to be unable to use normally ?
- Sometimes thinking too much is thinking too much , Programming requires more practice , Truth comes from practice . So I hit it again , Then I found that as long as you don't turn on debugging mode , In fact, the code will not execute debugger The operation of , Just press F2 The code runs to debugger Will be suspended , Then you can see debugger Nearby content
- But how should we judge whether the user has turned on debugging mode ? At first , I just want to execute the code to realize the breakpoint when the window size changes , But is it reasonable ? When the user clicks the breakpoint, next , May skip the current debugger You lose the interception effect you want , Or when the user opens the debug mode, the page can't listen to the window changes when the page is refreshed , So here we need a timer , It is specially used to loop monitor whether debugger Of .
- Why do we use timers to do debugger? Mainly because we don't know when to open debugging , At the same time, it can prevent users from clicking bebugger After the jump , Invalid for interception , Using timer is a better interception method at present , Turn on debug mode and loop indefinitely debugger, Even if he clicks, he can't finish clicking .
- We know how to hide the page content when debugging mode is turned on ? We can use time stamps to determine , Because every time debugger Will pause code execution , We just need debugger Before and after new A timestamp , The difference between the two subtractions is greater than 50 Just explain debugger 了 , This value can be set more as you think , So as to control the page to hide the content you want or display the content you want .
Code tutorial
!function() {
var timelimit = 50;
setInterval(function() {
var starttime = new Date();
debugger ;if (new Date() - starttime > timelimit) {
window.stop();
$("#app_open_hiden").hide();
$("#error").show();
$("#error").html("\u7cfb\u7edf\u68c0\u6d4b\u975e\u6cd5\u8c03\u8bd5\u002c\u8bf7\u5237\u65b0\u91cd\u8bd5\u0021")
} else {
$("#app_open_hiden").show();
$("#error").hide();
}
}, 500)
}();
Copy code
matters needing attention
- debugger Don't write code in your business logic , Otherwise, it's easy to be found that you debugger Nearby code logic
- debugger The code can be encrypted and confused by itself , It's better to become complex or difficult to understand
- In fact, using browser window size and page window size to compare pages is to do whether to open debugging mode , But if you separate the debug mode from the browser, you can't listen
- In fact, some people wrote it online npm The package monitors whether the user turns on debugging mode :devtools-detect
Crack debugger
Actually know how to play debugger Everyone knows , How to let debugger Not yet , That is to click prohibit debugger Just one symbol of , The whole page doesn't appear debugger, Click the arrow to turn blue Refresh the next page and there will be no debugger, Here's the picture
copyright notice
author[Hello harpy],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2021/08/20210827001450897N.html
The sidebar is recommended
- Crazy blessing! Tencent boss's "million JVM learning notes", real topic of Huawei Java interview 2020-2021
- JS JavaScript how to get the subscript of a value in the array
- How to implement injection in vuex source code?
- JQuery operation select (value, setting, selected)
- One line of code teaches you how to advertise on Tanabata Valentine's Day - Animation 3D photo album (music + text) HTML + CSS + JavaScript
- An article disassembles the pyramid architecture behind the gamefi outbreak
- BEM - a front-end CSS naming methodology
- [vue3] encapsulate custom global plug-ins
- Error using swiper plug-in in Vue
- Another ruthless character fell by 40000, which was "more beautiful" than Passat and maiteng, and didn't lose BMW
guess what you like
-
Huang Lei basks in Zhang Yixing's album, and the relationship between teachers and apprentices is no less than that in the past. Netizens envy Huang Lei
-
He was cheated by Wang Xiaofei and Li Chengxuan successively. Is an Yixuan a blessed daughter and not a blessed home?
-
Zhou Shen sang the theme song of the film "summer friends and sunny days" in mainland China. Netizen: endless aftertaste
-
Pink is Wangyuan online! Back to the peak! The new hairstyle is creamy and sassy
-
Front end interview daily 3 + 1 - day 858
-
Spring Webflux tutorial: how to build reactive web applications
-
[golang] walk into go language lesson 24 TCP high-level operation
-
August 23, 2021 Daily: less than three years after its establishment, Google dissolved the health department
-
The female doctor of Southeast University is no less beautiful than the female star. She has been married four times, and her personal experience has been controversial
-
There are many potential safety hazards in Chinese restaurant. The top of the program recording shed collapses, and the artist will fall down if he is careless
Random recommended
- Anti Mafia storm: He Yun's helpless son, Sun Xing, is destined to be caught by his dry son
- Introduction to flex flexible layout in CSS -- learning notes
- CSS learning notes - Flex layout (Ruan Yifeng tutorial summary)
- Today, let's talk about the arrow function of ES6
- Some thoughts on small program development
- Talk about mobile terminal adaptation
- Unwilling to cooperate with Wang Yibo again, Zhao Liying's fans went on a collective strike and made a public apology in less than a day
- JS function scope, closure, let, const
- Zheng Shuang's 30th birthday is deserted. Chen Jia has been sending blessings for ten years. Is it really just forgetting to make friends?
- Unveil the mystery of ascension
- Asynchronous solution async await
- Analysis and expansion of Vue infinite scroll source code
- Compression webpack plugin first screen loading optimization
- Specific usage of vue3 video play plug-in
- "The story of huiyeji" -- people are always greedy, and fairies should be spotless!
- Installing Vue devtool for chrome and Firefox
- Basic usage of JS object
- 1. JavaScript variable promotion mechanism
- Two easy-to-use animation JS that make the page move
- Front end Engineering - scaffold
- Java SQL Server intelligent fixed asset management, back end + front end + mobile end
- Mediator pattern of JavaScript Design Pattern
- Array de duplication problem solution - Nan recognition problem
- New choice for app development: building mobile applications using Vue native
- New gs8 Chengdu auto show announces interior Toyota technology blessing
- Vieira officially terminated his contract and left the team. The national security club sent blessings to him
- Less than 200000 to buy a Ford RV? 2.0T gasoline / diesel power, horizontal bed / longitudinal bed layout can be selected
- How does "heart 4" come to an end? Pinhole was boycotted by the brand, Ma Dong deleted the bad comments, and no one blessed him
- We are fearless in epidemic prevention and control -- pay tribute to the front-line workers of epidemic prevention!
- Front end, netty framework tutorial
- Xiaomi 11 | miui12.5 | android11 solves the problem that the httpcanary certificate cannot be installed
- The wireless charging of SAIC Roewe rx5 plus is so easy to use!
- Upload and preview pictures with JavaScript, and summarize the most complete mybatis core configuration file
- [25] typescript
- CSS transform Complete Guide (Second Edition) flight.archives 007
- Ajax foundation - HTTP foundation of interview essential knowledge
- Cloud lesson | explain in detail how Huawei cloud exclusive load balancing charges
- Decorator pattern of JavaScript Design Pattern
- [JS] 10. Closure application (loop processing)
- Left hand IRR, right hand NPV, master the password of getting rich