如题:c# 遍历获取本地Cookies文件夹下所有文件信息。
如题:c# 遍历获取本地Cookies文件夹下所有文件信息。
如题:c# 遍历获取本地Cookies文件夹下所有文件信息。
c# 遍历获取本地Cookies文件夹下所有信息
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答
- 冷雪液 2018-01-16 09:32关注
FileStream fs = new FileStream(filePath, FileMode.Open,FileAccess.Read, FileShare.ReadWrite);
StreamReader sr = new StreamReader(fs, System.Text.Encoding.Default);
filePath换成index.dat文件路径即可读取
完整的贴上来
List listCookie = new List();
string[] strCookies = null;
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", false);
if (key != null)
{
string val = (string)key.GetValue("Cookies");
if (val != null)
{
strCookies = Directory.GetFiles(val);
if (strCookies != null)
{
foreach (string str in strCookies)
{
if (str.Contains("index.dat"))
{
listCookie.Add(str);
}
}
}
}
}解决 无用评论 打赏 举报
悬赏问题
- ¥30 数值计算均差系数编程
- ¥15 redis-full-check比较 两个集群的数据出错
- ¥15 Matlab编程问题
- ¥15 训练的多模态特征融合模型准确度很低怎么办
- ¥15 kylin启动报错log4j类冲突
- ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
- ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
- ¥15 onvif+openssl,vs2022编译openssl64
- ¥15 iOS 自定义输入法-第三方输入法
- ¥15 很想要一个很好的答案或提示