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

推荐订阅源

W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
博客园 - 叶小钗
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
博客园_首页
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 三生石上(FineUI控件)
Help Net Security
Help Net Security
Cloudbric
Cloudbric
AI
AI
N
News | PayPal Newsroom
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
Forbes - Security
Forbes - Security
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
SecWiki News
SecWiki News
H
Heimdal Security Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
S
Security @ Cisco Blogs
Google DeepMind News
Google DeepMind News
V
V2EX
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
S
Security Affairs
L
LangChain Blog
The Hacker News
The Hacker News
F
Full Disclosure
aimingoo的专栏
aimingoo的专栏
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
Webroot Blog
Webroot Blog
A
About on SuperTechFans
H
Hacker News: Front Page
Cyberwarzone
Cyberwarzone
WordPress大学
WordPress大学
L
LINUX DO - 热门话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Attack and Defense Labs
Attack and Defense Labs
M
MIT News - Artificial intelligence

博客园 - 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并不是我以前想象中的那样安全。