惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
D
Docker
博客园 - 司徒正美
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
U
Unit 42
J
Java Code Geeks
A
About on SuperTechFans
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security Affairs
I
Intezer
Cisco Talos Blog
Cisco Talos Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
T
Threatpost
H
Hacker News: Front Page
G
Google Developers Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
Lohrmann on Cybersecurity
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
S
Secure Thoughts
GbyAI
GbyAI
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - JBoy

Update Cache js树 火狐对ajax同步的支持 JavaScript对DOM的解析 - JBoy - 博客园 快乐工作,好好学习! 年末琐事 做一个小总结 基于AJAX的Window资源管理器 DotText学习 开学前一周计划 终于知道如何用VS2005在类图状态下实现继承 可爱的病毒 悬棺 Factory Method And Abstract Factory .NET2.0中有关加密解密的知识 请看下面这段代码 - JBoy - 博客园 观察者模式与单例模式 Frontpage-Dreamweave-VisoStudio-Dreamweave-Ultraeditor 可怜的公平
Javascript真的是安全的脚本吗?
JBoy · 2007-05-07 · via 博客园 - JBoy

  “JavaScript是一种安全性语言,它不允许访问本地的硬盘,并不能将数据存入到服务器上,不允许对网络文档进行修改和删除,只能通过浏览器实现信息浏览或动态交互。从而有效地防止数据的丢失。”

  这是我的电子书上写着的关于Javascript的一段话。我认为这并不完全正确。Javascript可以访问本地服务器上的文件,也可以对文件进行删除与修改。但是这个文件很特殊,只能是Cookie文件。用记事本随便创建一个htm文件,然后输入以下代码:

<script language="javascript">
   date = new Date();
   date.setTime(date.getTime() + 3600);

   var my_date = escape("jld is a good boy");
   document.cookie="user_name=" + my_date + "; expires=" + date.toGMTString();
   alert(document.cookie); 
 </script>

然后打开:系统盘符\documents and settings\userName\cookie\文件夹,就可以找到相应Cookie,就是用这段脚本生成的。

所以,javascript并不是我以前想象中的那样安全。