ed: iplocate.py lazy regex local ip filter
This commit is contained in:
parent
e33fdacbbc
commit
bbfb848217
@ -25,9 +25,10 @@ console = Console()
|
|||||||
|
|
||||||
# IP validate https://stackoverflow.com/questions/319279/how-to-validate-ip-address-in-python
|
# IP validate https://stackoverflow.com/questions/319279/how-to-validate-ip-address-in-python
|
||||||
ip_regx = "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$"
|
ip_regx = "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$"
|
||||||
|
ip_local_regx = "^192\.168\.0\.([0-9]|[0-9][0-9]|[0-9][0-9][0-9])$"
|
||||||
|
|
||||||
def filtro_ip_propia(ip):
|
def filtro_ip_propia(ip):
|
||||||
return True if ip != ownip else False
|
return True if ip != ownip and not re.search(ip_local_regx, ip) else False
|
||||||
|
|
||||||
|
|
||||||
def print_ipinfo(ip, tkn=True):
|
def print_ipinfo(ip, tkn=True):
|
||||||
|
@ -12024,6 +12024,60 @@
|
|||||||
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
||||||
<path d="M 751.797048888889 359.4040910315046 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
<path d="M 751.797048888889 359.4040910315046 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
</g>
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(-1024, 0)">
|
||||||
|
<path d="M 303.4446222222223 512.1115446588558 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(0, 0)">
|
||||||
|
<path d="M 303.4446222222223 512.1115446588558 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
||||||
|
<path d="M 303.4446222222223 512.1115446588558 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(-1024, 0)">
|
||||||
|
<path d="M 225.49944888888888 429.435443004144 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(0, 0)">
|
||||||
|
<path d="M 225.49944888888888 429.435443004144 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
||||||
|
<path d="M 225.49944888888888 429.435443004144 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(-1024, 0)">
|
||||||
|
<path d="M 471.4244266666667 288.8151035584015 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(0, 0)">
|
||||||
|
<path d="M 471.4244266666667 288.8151035584015 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
||||||
|
<path d="M 471.4244266666667 288.8151035584015 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(-1024, 0)">
|
||||||
|
<path d="M 456.37959111111115 220.76751046040675 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(0, 0)">
|
||||||
|
<path d="M 456.37959111111115 220.76751046040675 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
||||||
|
<path d="M 456.37959111111115 220.76751046040675 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(-1024, 0)">
|
||||||
|
<path d="M 533.2196977777778 299.0548072576999 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(0, 0)">
|
||||||
|
<path d="M 533.2196977777778 299.0548072576999 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
||||||
|
<path d="M 533.2196977777778 299.0548072576999 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(-1024, 0)">
|
||||||
|
<path d="M 432.2618311111111 254.8858186144526 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(0, 0)">
|
||||||
|
<path d="M 432.2618311111111 254.8858186144526 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
||||||
|
<path d="M 432.2618311111111 254.8858186144526 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
<g clip-path="url(#page)" transform="translate(-1024, 0)">
|
<g clip-path="url(#page)" transform="translate(-1024, 0)">
|
||||||
<path d="M 797.48224 326.9801587634675 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
|
<path d="M 797.48224 326.9801587634675 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
|
||||||
</g>
|
</g>
|
||||||
@ -13905,6 +13959,15 @@
|
|||||||
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
||||||
<path d="M 303.4446222222223 512.1115446588558 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
|
<path d="M 303.4446222222223 512.1115446588558 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
|
||||||
</g>
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(-1024, 0)">
|
||||||
|
<path d="M 734.6211555555556 409.4098434630326 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(0, 0)">
|
||||||
|
<path d="M 734.6211555555556 409.4098434630326 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
|
<g clip-path="url(#page)" transform="translate(1024, 0)">
|
||||||
|
<path d="M 734.6211555555556 409.4098434630326 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
|
||||||
|
</g>
|
||||||
<g clip-path="url(#page)">
|
<g clip-path="url(#page)">
|
||||||
<rect fill="#ffffff" fill-opacity="0.8" height="12" width="1024" x="0" y="756"/>
|
<rect fill="#ffffff" fill-opacity="0.8" height="12" width="1024" x="0" y="756"/>
|
||||||
<text fill="#000000" font-family="Arial, Helvetica, sans-serif" font-size="9px" x="2" y="765">Maps & Data (C) OpenStreetMap.org contributors</text>
|
<text fill="#000000" font-family="Arial, Helvetica, sans-serif" font-size="9px" x="2" y="765">Maps & Data (C) OpenStreetMap.org contributors</text>
|
||||||
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
Loading…
Reference in New Issue
Block a user