// chopper.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <stdio.h>
#include <WinSock2.h>
#include <Windows.h>
#include <stdlib.h>


int redpwd(char* pwd)
{
	FILE* fp;
	if ((fp = fopen(pwd,"rb")) == NULL)//以只读方式打开
	{
		printf("I'am sorry,pwd:%s not found\r\n",pwd);
		return 0;
	}

	char buf[MAX_PATH] = {0};
	int i = 0;
	while (fgets(buf,MAX_PATH,fp))//循环读取字符串
	{
		printf("已经读取密码:%d-------->读取内容 :%s \n",++i,buf);
	}
	fclose(fp);//关闭文件句柄
	return 0;
}

int main(int argc,char** argv)
{
	if (argc < 2)
	{
		printf("[-]:%s READ_File\r\n",argv[0]);
		return 0;
	}
	redpwd(argv[1]);
	return 0;
}

  

相关文章:

  • 2021-09-25
  • 2021-12-15
  • 2021-11-04
  • 2022-02-07
  • 2021-12-22
  • 2022-01-07
  • 2021-07-22
  • 2021-09-05
猜你喜欢
  • 2022-03-07
  • 2021-06-01
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
相关资源
相似解决方案