Hi there,
An ip address consists of four decimal numbers, each ranging from 0 to 255, separated by dots.
I need to find a script in R that search for users which the last octect ip address is greater or equal than 128.
Let's say I have the following data:
library(iptools)
library(dplyr)
library(stringr)
library(tidyr)
IP_LIST <- data.frame(
"User" = c("John", "Carl", "Mary",
"Kim", "Jane", "Jessie",
"Peter"),
"IP" = c('172.16.0.15',
'192.168.200.90',
'172.16.2.129',
'198.16.15.254',
'172.25.25.19',
'192.168.25.200',
'192.129.200.10') )
The result should give me the users/ips:
User IP_Address
Carl 172.16.2.129
Mary 192.16.15.254
Jessie 192.168.25.200
Because all those ip's last octects are greater or equal than 128 (129, 254 and 200).
I appreciate any help.
Kind regards,
Luiz.