VC Read File Contents

Source: Internet
Author: User
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)//Open {printf ("I am sorry,pwd:%s not found\r\n", pwd) in read-only mode; return 0;} Char Buf[max_path] = {0};int i = 0;while (fgets (BUF,MAX_PATH,FP))//loop read string {printf ("Read password:%d--------> Read content:%s \ n", + + I,BUF);} Fclose (FP);//close file handle 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;}


VC Read File Contents

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.