LR脚本 关于破解码(转)
转自:http://blog.csdn.net/gzh0222/article/details/7641877
Action() { int flen; //定义一个整型变量保存获得文件的大小 long filedes; //保存文件句柄 char file[256]="f:\\12.jpg"; //保存文件路径及文件名 char result[4]=""; web_set_max_html_param_len("2000000");//设置页面接收最大的字节数,该设置应大于下载文件的大小 web_reg_save_param("pic", "LB=", "RB=", "Ord=1", "Search=Body", LAST); web_url("randpiccloud","URL=http://comment8.mydrivers.com/radompage.aspx",LAST); flen = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE); //获得文件大小 if(flen > 0) { if((filedes = fopen(file, "wb")) == NULL) { lr_output_message("oh cloud your Open File Failed!"); return -1; } fwrite( lr_eval_string("{pic}"),flen,1,filedes ); fclose( filedes ); } system("tesseract.exe f:\\12.jpg E:\\1 -1"); if((filedes = fopen("E:\\1.txt", "r")) == NULL) { lr_output_message("oh,cloud your Open File Failed!"); return -1; } fread( result,4,4,filedes); fclose( filedes ); lr_output_message("%s",result); return 0; }
要安装tesseract-ocr-setup http://download.csdn.net/detail/gzh0222/4358388