tiny server升级版本 浅析

tiny server升级版本 浅析

代码来源在此:来源

试玩界面

Alt text

未完成

post表单界面

Alt text

如果根据以上返回 构造post

尝试 curl post
noya@noya-VirtualBox:/media/sda_m/socketHome/tiny_server-Update/Tiny_process$ curl  -d "add_num1=10&add_num2=20" "localhost:12345/add.html"
<html><title>Tiny Error</title><body bgcolor=ffffff>
403: Forbidden
<p>Tiny couldn't run the CGI program: ./add.html
<hr><em>The Tiny Web server</em>

curl html加上参数

rl   "localhost:12345/add.html?10&36"
<html><title>Tiny Error</title><body bgcolor=ffffff>
404: Not found
<p>Tiny couldn't find this file: ./add.html?10&36
<hr><em>The Tiny Web server</em>

柳暗花明

抓取现场 tcpdump 抓post

thanks
tcpdump to capture post

the command is

sudo tcpdump -i lo -s 0 -A -vv 'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354'

when I click the web button ,I got the post content

Alt text

curl 命令行重现
post方式

Alt text

curl  -d "add_num1=10&add_num2=20" "localhost:12345/cgi-bin/adder"

或者换种形式是:

 curl  "localhost:12345/cgi-bin/adder?7&8"
todo

不知道通过 *.html等文本是否可以带参数,当前尝试,作为文件名里面去了

不懂submit这个键对应到代码的

小节

一个支持 get post等的http server
一个支持 多路io的server(todo)

一个调试 post等报文的方法
一种curl 启动post的方法

如何server /client联调

chenshuo 基础工具 tempest

Alt text

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值