Closed ghost closed 2 years ago
@darkestscience -> https://github.com/epsylon/ufonet/blob/master/core/main.py#21
I tried those pattern. Of the three patterns, only the one incorporating the top two improvements was marked as SUCCESS.
@darkestscience I don't understand where you want to get there. Do not regular expressions work as they are?
External checker -> https://status.ws/ -> is down... but the tool should try the next one, which is actually working
check_ip_service1 = 'https://checkip.org/'
check_ip_service3 ='https://ip.42.pl/ra'
these are working.
but
check_ip_service2 = 'https://whatismyip.org/'
returns 403
when request from python code.
ERRO: name 'urlopen' is not defined↓
import urllib.request, urllib.error, urllib.parse
str(urlopen(check_ip_service1).read())
fix
import urllib.request, urllib.error, urllib.parse
from urllib.request import urlopen
str(urlopen(check_ip_service1).read())
'NoneType' object has no attribute 'group' error because search result is none ↓
re.compile(r'Address: (\d+\.\d+\.\d+\.\d+)').search(data).group(1)
fix(change)
pub_ip = re.compile(r'(\d+\.\d+\.\d+\.\d+)').search(data).group(1)
@darkestscience Sorry but I don't see your point... Do not regular expressions work as they are or you are providing another code for other reasons?
oh sorry...
Regular expressions is not working.
@darkestscience Ok, you're referring to the "--attack-me" option.
It should work after this commit: https://github.com/epsylon/ufonet/commit/753904e3923c9d972997ff7b060acce38c3801f9
Thanks for your time! ;-)
Because
1
https://checkip.org/ is
<h1>Your IP Address: <span style="color: #5d9bD3;">180.4.14.196</span></h1>
so main.py:4035 must beself.pub_ip = re.compile(r'(\d+\.\d+\.\d+\.\d+)').search(data).group(1)
2
main.py:4034 and main.py:4039
data = str(urlopen(self.check_ip_service1).read()) # check for public ip
must bedata = str(urllib.request.urlopen(self.check_ip_service1).read()) # check for public ip
Probabry.