当前位置:网站首页>XSS 跨站脚本攻击
XSS 跨站脚本攻击
2022-06-26 08:30:00 【Cwillchris】
一、XSS 跨站脚本攻击
1、Cookie概述
2、使用 JavaScript 创建 Cookie
JavaScript 可以使用 document.cookie 属性来创建 、读取、及删除 cookie。
例 1:JavaScript 中,创建 cookie 如下所示:
document.cookie="username=John Doe";
例 2:你还可以为 cookie 添加一个过期时间(以 UTC 或 GMT 时间)。默认情况下,cookie 在 浏览器关闭时删除:
document.cookie="username=John Doe; expires=Thu, 18 Dec 2043 12:00:00 GMT";
如:

3、JavaScript Cookie 实例
实验描述:
在以下实例中,我们将创建 cookie 来存储访问者名称。
首先,访问者访问 web 页面, 他将被要求填写自己的名字。该名字会存储在 cookie 中。
边栏推荐
- Intra class data member initialization of static const and static constexpr
- Compiling owncloud client on win10
- Undefined symbols for architecture i386 is related to third-party compiled static libraries
- optee中的timer代码导读
- STM32 project design: smart home system design based on stm32
- Performance comparison of unaryexpr's function on matrix elements in eigen Library
- Relationship extraction --r-bert
- RF filter
- Zlmediakit push pull flow test
- Opencv learning notes 3
猜你喜欢
随机推荐
STM32 based d18s20 (one wire)
FFmpeg音视频播放器实现
When loading view, everything behind is shielded
2020-10-20
Discrete device ~ resistance capacitance
leetcode2022年度刷题分类型总结(十二)并查集
Record the problem yaml file contains Chinese message 'GBK' error
VS2005 compiles libcurl to normaliz Solution of Lib missing
pgsql_ UDF01_ jx
Google Chrome collection
Application of wireless charging receiving chip xs016 coffee mixing cup
Corn image segmentation count_ nanyangjx
Ltp-- extract time, person and place
Swift code implements method calls
Euler function: find the number of numbers less than or equal to N and coprime with n
QT_ AI
WBC learning notes (I): manually push WBC formula
VS2005 project call free() compiled with static libcurl library reported heap error
Opencv learning notes 3
Batch execute SQL file








