douhan9619 2014-10-30 17:03
浏览 29

安全卷曲调用 - 命令行调用

I am trying to develop a way for my customer to send me a curl request to get data from my server. I need this to be psuedo-secure. I would expect my customer to send me something, I authenticate him, and then wait for him to send me a request for data. Something like

 curl -O 1.2.3.4/curlRequest.php?username=Joe&password=123456790

curlRequest.php would verify some credentials. Clearly sending u/p over get is a terrible idea. any thoughts how i can go about this. I am not asking anyone to write code for me, Im asking more for what procedures I could use to achieve my goal.

my first thought is to send request 1 that would request some string:

  curl 1.2.3.4/authCurl.php?userName=Joe

using this and the fact that this request came from a known server, i can respond with a string:

 125tewgkljgetEDtstdkj

then all future requests must contain that string for the next X minutes:

 curl -O 1.2.3.4/curlRequest.php?hash=125tewgkljgetEDtstdkj

is this a terrible idea? Any other options that you could recommend?

  • 写回答

1条回答 默认 最新

  • donglu5047 2014-10-30 17:13
    关注

    the best way is to curl, the most secure in your case. The script that will be at the server processes the data from the $ _POST array and create a random manner that will give the key back to the client and for each connection checked his keys ... if the key is not present on the new login and update the key in the database and the client

    For more info I can help you with this process. I soon finish a project that runs on the client in the form of the application but is connected to a MySQL database on a remote server ...

    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用