[CTF/Network Security] Detailed analysis of view_source problem solving in the offensive and defensive world

[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

  1. Click the right mouse button and click to view the page source code:

  2. 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:
    insert image description here

  3. 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

  4. 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+Ito open the developer tools, then switch to Elementsthe tab, and click the element at the top of the page <html>to view the source code of the page.

  5. 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 bar view-source:https://www.example.comand 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交互,例如导航到其他页面或单击链接


insert image description here


Summarize

The knowledge points of this question are relatively simple.
I am Qiu said , see you next time.

Guess you like

Origin blog.csdn.net/2301_77485708/article/details/130786125