谁能帮忙将一段C代码用VB写出来

来源:百度知道 编辑:UC知道 时间:2024/06/20 18:55:18
不懂C,不知道懂的朋友能不能用把下面的代码转化成VB的,谢过!

#include <stdio.h>
int main(int argc,char** argv)
{
FILE *fp;
char ch;
printf("\n-- Bypassing of web filters by using ASCII Exploit By CoolDiyer --\n");
if(argc<2){
printf("\nUsage: \n\t %s srcfile >destfile\n",argv[0]);
return -1;
}
if((fp=fopen(argv[1],"r"))==NULL){
printf("File %s open Error",argv[1]);
return -1;
}
printf("\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=US-ASCII\" />\n<title>Bypassing of web filters by using ASCII Exploit By CoolDiyer</title>\n</head><body>\n");
while((ch=fgetc(fp))!=EOF){
ch|=0x80;

printf("%c",ch);
};
fclose(fp);
printf("\n</body></html>\n");

刚刚写完,没有调试,大致就这么回事儿了,你自己调试吧 。。。
================================================

function main(argv as Collection)
dim return_v as Integer
return_v = 0

dim argc as Integer
argc = argv.Count

dim fp as Integer
dim ch as String

print vbcrlf & "-- Bypassing of web filters by using ASCII Exploit By CoolDiyer --" & vbcrlf
if (argc<2) then
print vbcrlf & "Usage: " vbcrlf & argv(0) & " srcfile >destfile" & vbcrlf
return_v = -1
goto return_line
end if

err.clear
fp = FileNumber()
open argv(1) for Input as fp
if err.count > 0 then
print "File " & argv(1) & " open Error"
return_v = -1
goto return_line
end if

print vbcrlf & "<html>" & vbcrlf & _
"<head>" & vbcrlf & _
"<meta http-equiv=\"Content