I am building a sniffer with Qt as GUI, pcap as capture library and QtCreator as GUI under Ubuntu 10.04.
Problem is: Before I can capture packets, since my app is not meant to be run as root, I need to
sudo setcap cap_net_raw,cap_net_admin=eip my_program
and at every build, this capability is overwr开发者_Go百科itten. Any idea how i can automate this process using QtCreator? I tried to add the command to the build steps after the Make step, but it doesn't seem to work that way, probably because of the "sudo" required...
Thank you!
加载中,请稍侯......
精彩评论