Best way to interact with a service for exploitation purpose

主宰稳场 提交于 2019-12-09 07:45:32

Take a look into expect, which "talks" to interactive programs with the help of a user provided script.

Usage

expect ./interact

or making interact executable (chmod a+x interact):

./interact

where interact is the following script:

#!/usr/bin/expect
spawn nc 127.0.0.1 8080
send -- "hallo\r"
expect "hi how are you?\r"

This is just a simple example, the man page is full of in depth explanations and there are also example scripts which come with the installation.

References
* http://linuxaria.com/howto/2-practical-examples-of-expect-on-the-linux-cli?lang=en

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!