Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No hosts or host table rows not found #84

Open
jmb365 opened this issue Sep 21, 2021 · 20 comments
Open

No hosts or host table rows not found #84

jmb365 opened this issue Sep 21, 2021 · 20 comments

Comments

@jmb365
Copy link

jmb365 commented Sep 21, 2021

I solved this error by altering the Python code in noip-renew.py by changing:
HOST_URL = "https://my.noip.com/#!/dynamic-dns"
to:
HOST_URL = "https://my.noip.com/dynamic-dns"

Then one must re-rerun the shell script setup.sh and choose option 1.

Hope this this helps others...

@jmb365 jmb365 changed the title No hosts or host table not found No hosts or host table rows not found Sep 21, 2021
@Liniya
Copy link

Liniya commented Sep 29, 2021

Still doesn't work for me. I also tried "https://www.noip.com/redirect/mynoip?force=true&intended=dynamic-dns", again with no luck.

@tantien11
Copy link

Still doesn't work for me. I also tried "https://www.noip.com/redirect/mynoip?force=true&intended=dynamic-dns", again with no luck.

In noip-renew.py line 77 change:
self.browser.find_element_by_name("Login").click()
To:
self.browser.find_element_by_id("clogs-captcha-button").click()

@Liniya
Copy link

Liniya commented Oct 2, 2021

In noip-renew.py line 77 change: self.browser.find_element_by_name("Login").click() To: self.browser.find_element_by_id("clogs-captcha-button").click()

Thanks, it works now.

@QuanTrieuPCYT
Copy link

Still doesn't work for me. I also tried "https://www.noip.com/redirect/mynoip?force=true&intended=dynamic-dns", again with no luck.

In noip-renew.py line 77 change: self.browser.find_element_by_name("Login").click() To: self.browser.find_element_by_id("clogs-captcha-button").click()

also worked for me, thanks a lot

@Sopor
Copy link

Sopor commented Oct 15, 2021

Can someone upload a working file? There has been so many small tweaks in the master that it is almost impossible to keep track of all these changes :(

@Liniya
Copy link

Liniya commented Oct 29, 2021

Can someone upload a working file? There has been so many small tweaks in the master that it is almost impossible to keep track of all these changes :(

Here you go. Should still be working at the moment.

@Sopor
Copy link

Sopor commented Oct 29, 2021

@Liniya That seems to be the original file without any modifications, but i will give it a try, thanks!

My own file seems to work when the ddns has expired, but it can't detect how many days there are left until the next update. When it was working to 100 percent it changed the cron job to run at the same day it expires.

@Liniya
Copy link

Liniya commented Oct 30, 2021

@Liniya That seems to be the original file without any modifications, but i will give it a try, thanks!

My own file seems to work when the ddns has expired, but it can't detect how many days there are left until the next update. When it was working to 100 percent it changed the cron job to run at the same day it expires.

No, it is the updated file. You can check by doing a diff with the one in the repo. Perhaps you didn't run the install procedure again (or just replace yours in /usr/local/bin).

@Sopor
Copy link

Sopor commented Nov 17, 2021

When i run it i get a picture called exception.png in the log directory and it creates a new cron job that will run the next day at 00:30. When the script is working it will detect how many days there are left and add that day to the cron job. At least it did that before when it was working as it should.

Will it create a daily cron job for you too, @Liniya or will it create one the day it will be able to update?

@Sopor
Copy link

Sopor commented Nov 17, 2021

When i run the script you sent the exception.png looks like this:
image

When i run the script i have modified the exception.png looks like this:
image

So, i don't think any of the scripts are working as they should :(

@peterchs
Copy link

If you go to renew/view your hostnames manually are there no hosts listed like the screenshot? Maybe your hosts werent renewed and you've lost them.. :(

With @neothematrix as-yet unmerged PR #89 its working for me.

@Sopor
Copy link

Sopor commented Nov 17, 2021

@peteakalad Of course all my hostnames are there :)

You can see they are there in the above picture but i have double checked it manually by logging in to noip.

Will the cron job run every day for you or only when it need to?

@peterchs
Copy link

But pic 2 had no hostnames listed? The url accessed on pic 2 is what the script uses to determine the hosts.

Not sure about the cron it sets up itself I set mine up manually to run daily.

Any way try pr #89 code.

@Sopor
Copy link

Sopor commented Nov 17, 2021

But then your script it not working either. It should add the date it need to run when it is creating the cron job. Running it everyday is not what it suppose to do.

I did made the changes you suggested but i get the same exception.png

When the hostnames need an update the script works but it is the cron job that doesn't work.

@Sopor
Copy link

Sopor commented Nov 17, 2021

If you hover your mouse over Active you should see how many days there are left before it need to be Confirm

image

@Sopor
Copy link

Sopor commented Nov 17, 2021

Not sure about the cron it sets up itself I set mine up manually to run daily.

Running it daily can get you banned.

@peterchs
Copy link

It works for my purposes. I've been running for some time daily - no ban. You have evidence that running daily can get you banned?

I'd say running any automated script to renew could get you banned :)

Sounds like somethings broken on the cron setup and its causing it to run daily anyway, you'd better turn it off of you'll get banned! :P

If its the cron setup failing not the actual renewal then a new issue would be better.

@Sopor
Copy link

Sopor commented Nov 17, 2021

I'm not an expert in python/bash but it seems that the script should save a results.png when it is working and then count how many days there are left to set the cron job to run only when it is needed and not everyday.

        hosts = self.get_hosts()
        for host in hosts:
            host_link = self.get_host_link(host, iteration) # This is for if we wanted to modify our Host IP.
            host_button = self.get_host_button(host, iteration) # This is the button to confirm our free host
            host_name = host_link.text
            expiration_days = self.get_host_expiration_days(host, iteration)
            next_renewal.append(expiration_days)
            self.logger.log(f"{host_name} expires in {str(expiration_days)} days")
            if expiration_days < 7:
                self.update_host(host_button, host_name)
                count += 1
            iteration += 1
        self.browser.save_screenshot("results.png")
        self.logger.log(f"Confirmed hosts: {count}", 2)
        nr = min(next_renewal) - 6
        today = date.today() + timedelta(days=nr)
        day = str(today.day)
        month = str(today.month)
        subprocess.call(['/usr/local/bin/noip-renew-skd.sh', day, month, "True"])
        return True

To set the cron job it will send the arguments day, month, and "True" with the noip-renew-skd.sh and it should set the correct cron job time. For some reason it will not do that because something is failing and when it can't do that it will instead set the cron job to run everyday at 00:30. If it saves exception.png it will send False instead of True:

    def run(self):
        rc = 0
        self.logger.log(f"Debug level: {self.debug}")
        try:
            self.login()
            if not self.update_hosts():
                rc = 3
        except Exception as e:
            self.logger.log(str(e))
            self.browser.save_screenshot("exception.png")
            subprocess.call(['/usr/local/bin/noip-renew-skd.sh', "*", "*", "False"])
            rc = 2
        finally:
            self.browser.quit()
        return rc

Here is a part of the bash file that will set the cron job to different cron jobs if it is True instead of False

$SUDO crontab -u $USERROOT -l | grep -v '/noip-renew*'  | $SUDO crontab -u $USERROOT -
if [[ $3 = "True" ]]; then
    ($SUDO crontab -u $USERROOT -l; echo "$NEWCJOB") | $SUDO crontab -u $USERROOT -
else
    ($SUDO crontab -u $USERROOT -l; echo "$CRONJOB") | $SUDO crontab -u $USERROOT -
fi

Something need to be changed in this line or around it:

expiration_days = self.get_host_expiration_days(host, iteration)

@Sopor
Copy link

Sopor commented Nov 17, 2021

It works for my purposes. I've been running for some time daily - no ban. You have evidence that running daily can get you banned?

I'd say running any automated script to renew could get you banned :)

You took the words right out of my mouth. You are running a script on the exact same day and time. It is easy to detect it. That is why it should be avoided, so no-ip won't try to stop this script from working.

I don't know if the text is still there but for many years ago i could read on there pages that if you don't included a user agent in your ddns update script they will/could ban you. If they ban you for a simple thing as a missing user agent they will for certain ban you if you use scripts like this one.

There is probably a reason for @loblab to included this feature :)

@peterchs
Copy link

It’s also easy to detect the default of this script - it always sets up crons for 0030hrs, just not as frequent of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants