Madwifi Tool

This is just a quick and dirty little box to start, release, and kill pump daemon for Atheros/madwifi in DSL.

don't laugh... it works

Here’s the code:
———————————————————-
#!/bin/flua
— net.tool
— by lucky13

w = Window{130, 140, “net.tool”}

— This button gets your IP:
ethBtn = Button{10,10,50,30, “connect”}
function ethBtn:callback()
execute(‘aterm -T nettool -e sudo pump -i ath0’)
end

— This button releases the IP:
releaseBtn = Button{10,50,50,30, “release”}
function releaseBtn:callback()
execute(‘aterm -T nettool -e sudo pump -r’)
end

— This button kills the pump daemon completely:
killpumpBtn = Button{10,90,50,30, “kill”}
function killpumpBtn:callback()
execute(‘aterm -T nettool -e sudo pump -k’)
end

— This button starts rc.firewall
fwStartBtn = Button{70,10,50,30, “fw-start”}
function fwStartBtn:callback()
execute(‘aterm -T firewall -e sudo /etc/init.d/rc.firewall start’)
end

— This button stops rc.firewall
fwStopBtn = Button{70,50,50,30, “fw-stop”}
function fwStopBtn:callback()
execute(‘aterm -T firewall -e sudo /etc/init.d/rc.firewall stop’)
end

w:end_layout()
w:show()
———————————————————-
Then just make it executable and add a menu entry for it. Alternatively, you can just make menu entries for the commands above to start/stop/kill your connection.

Advertisements

%d bloggers like this: