[CTF/Network Security] Detailed analysis of view_source problem solving in the offensive and defensive world
Description of the topic: Teacher X asked Xiao Ning to view the source code of a webpage, but Xiao Ning found that the right mouse button didn't seem to work.
View page source code classification
-
Click the right mouse button and click to view the page source code:
-
Using the browser menu: Different browsers may offer the option to view the source code of a page in different places.
Take Firefox as an example, just open the application menu:
-
Use shortcut keys: Almost all modern browsers support shortcut keys to quickly open the page source code.
For example, on Windows, you can use the key combination Ctrl+U to open the source code view; on MacOS, you can use the key combination Command+Option+U -
Use developer tools: Most browsers offer built-in developer tools, which often include a source code viewer. In the Chrome browser, you can use the key combination
Ctrl+Shift+I
to open the developer tools, then switch toElements
the tab, and click the element at the top of the page<html>
to view the source code of the page. -
Type in front of the URL address
view-source:
and press Enter to view the page source code.
For example, if you want to view the source code of the https://www.example.com website, you can enter it in the browser address barview-source:https://www.example.com
and press the Enter key .
It should be noted that this method is only applicable to some specific browsers (such as Chrome and Firefox), while other browsers may not support this method. Also , when viewing the source code of a page in this way, theURL地址栏中将仍保留view-source:前缀,并且用户无法与该URL交互,例如导航到其他页面或单击链接
Summarize
The knowledge points of this question are relatively simple.
I am Qiu said , see you next time.