You are not logged in.

#1 2015-05-10 14:53:55

Rearis
Member
Registered: 2015-05-07
Posts: 22

Can't put the PyIpChanger to work

Offline

#2 2015-05-10 15:12:52

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,605

Re: Can't put the PyIpChanger to work

What is tibia?

Edit: Found it in the AUR. It appears that /usr/bin/tibia is a shell script, not an executable. That's probably why it's failing.

Last edited by Scimmia (2015-05-10 15:26:48)

Offline

#3 2015-05-10 19:58:16

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Can't put the PyIpChanger to work

It seems that the script needs the write access to the tibia binary.

        # This might give a open error if the path is wrong
        try:
            tibia = open(path, "r+b")
        except:
            self.te.append("Error: Unable to open %s" % path)
            return

You have to change the permission for the tibia executable or copy it for example to your home.


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#4 2015-05-14 16:56:41

Rearis
Member
Registered: 2015-05-07
Posts: 22

Re: Can't put the PyIpChanger to work

What?

Offline

#5 2015-05-14 19:40:31

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Can't put the PyIpChanger to work

Rearis wrote:

What?

The code in my previous post is extracted from the python script PyIpChanger.py (lines 142-147 in the file) and it can be translated in the following instructions:

  1. try to open the file named path for both reading and writing operations.

  2. if step 1 failed then show an unuseful error message.

Now, /usr/bin/tibia is owned by root and can be read and executed by a normal user but only the owner can open it for writing. This means that when you run the scrip the step 1 will fail unless you change its permissions (or change the owner) https://wiki.archlinux.org/index.php/Fi … attributes

Last edited by mauritiusdadd (2015-05-15 04:41:18)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#6 2015-05-14 21:15:56

Rearis
Member
Registered: 2015-05-07
Posts: 22

Re: Can't put the PyIpChanger to work

"try to open the file named path for both reading and writing operations."

There is no file named "patch"

"Now, /usr/bin/tibia is owned by root and can be read and executed by a normal user but only the owner can open it for writing. This means that when you run the scrip the step 1 will fail unless you change its permissions (or change the owner)"

So, what I do?

Offline

#7 2015-05-15 04:48:49

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Can't put the PyIpChanger to work

Rearis wrote:
mauritiusdadd wrote:

try to open the file named path for both reading and writing operations.

There is no file named "patch"

path is a variable, a place-holder for the name of the tibia executable.

Rearis wrote:
mauritiusdadd wrote:

Now, /usr/bin/tibia is owned by root and can be read and executed by a normal user but only the owner can open it for writing. This means that when you run the scrip the step 1 will fail unless you change its permissions (or change the owner)

So, what I do?

Please, don't be a help vampire. I already said you what to do and also gave you a link to the arch wiki page in which it is explained how to do it.


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

Board footer

Powered by FluxBB