Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 【H】2【H】
- local function isVpnUsed()
- import "java.net.NetworkInterface"
- import "java.util.Collections"
- import "java.util.Enumeration"
- import "java.util.Iterator"
- local nlp= NetworkInterface.getNetworkInterfaces();
- if (nlp~=nil) then
- local it = Collections.list(nlp).iterator();
- while (it.hasNext()) do
- local nlo = it.next();
- if (nlo.isUp() && nlo.getInterfaceAddresses().size() ~= 0) then
- if ((tostring(nlo):find("tun0")) or (tostring(nlo):find("ppp0"))) then
- return true
- end
- end
- end
- return false
- end
- end
- if isVpnUsed() then
- os.exit()
- end
Add Comment
Please, Sign In to add comment