zoukankan
html css js c++ java
文件类型的判断
public
bool
isExeDllFile(
string
sFileName)
{
bool
xx
=
false
;
//
default the "sFileName" is not a .exe or .dll file;
FileStream fs
=
new
FileStream(sFileName, FileMode.Open, FileAccess.Read);
BinaryReader r
=
new
BinaryReader(fs);
string
bx
=
""
;
byte
buffer;
try
{
buffer
=
r.ReadByte();
bx
=
buffer.ToString();
buffer
=
r.ReadByte();
bx
=
bx
+
buffer.ToString();
}
catch
{
}
r.Close();
fs.Close();
if
(bx
==
"
7790
"
||
bx
==
"
8297
"
||
bx
==
"
8075
"
)
//
7790:exe 8297:rar 8075:pk
{
xx
=
true
;
}
return
xx;
}
dll:MZ
exe:MZ
rar:Rar
zip:PK
查看全文
相关阅读:
数组与指针
壁纸
2019/1/11
指针A
数组B
一起来抓老鼠啊!快乐呀!
打印沙漏
I think I need a boat house
币值转换
《C语言程序设计》编程总结汇总
原文地址:https://www.cnblogs.com/supercode/p/173340.html
最新文章
java ArrayList去重复值
求余数
使用jQuery.noConflict方法来轻松实现控制权的转交
oracle的递归运算(树运算) 无限树形
oracle递归查询子节点
判断日期是否有交集
01背包模板
斐波那契数列矩阵快速幂
递推置换,交换次数最少得到升序序列
群论:循环的平方 循环元素为偶数的循环节必须为偶数
热门文章
polya置换
单调队列优化dp,k次移动求最长路
数组模拟链表
线性dp,分层图思想
约瑟夫环
polya定理,环形涂色
常量和指针
指向指针的指针
void指针和NULL指针
数组指针和指针数组
Copyright © 2011-2022 走看看