InetAddress.getByAddress/host/addr

Logs access to InetAddress.getByAdress, no blocking is performed.

CollectionFif
GroupInternet.Firewall
NameInetAddress.getByAddress/host/addr
AuthorFif_
Version2
Updated (UTC)2018-02-20 23:00:17
Created (UTC)2018-02-20 23:00:17
Downloads1381
Class namejava.net.InetAddress
Method namegetByAddress
Parameter typesjava.lang.String, [B
Return typejava.net.InetAddress
Min SDK1
Max SDK999
Min APK0
Max APK2147483647
Excluded packages-
EnabledYes
OptionalNo
UsageYes
NotifyNo
Settings-
-- Fif.InetAdress.getByAddress is a Lua hook designed to work with XPrivacyLua.
-- Copyright (C) 2018 Philippe Troin (Fif_ on XDA)

-- Fif.InetAdress.getByAddress is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.

-- Fif.InetAdress.getByAddress is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.

-- You should have received a copy of the GNU General Public License
-- along with XPrivacyLua.  If not, see <http://www.gnu.org/licenses/>.

function after(hook, param)
    local host
    if hook:getParameterTypes().length == 2 then
        host = param:getArgument(0)
        if host ~= nil and #host == 0 then
            host = nil
        end
    end
    if host == nil then
        local rv = param:getResult()
        if rv ~= nil then
            host = rv:getHostAddress()
        end
    end
    if host ~= nil then
        log('Allow ' .. host)
    else
        log('Failed')
    end
    return false
end