Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Compiling the source

Help
Faery King
2008-06-25
2013-05-28
  • Faery King
    Faery King
    2008-06-25

    I wanted to run the program from the source code. So i downloaded the version for windows of the source. I unzipped it on the desktop and then dragged it to C:/nt.dv.svid/pykeylogger-1.0.1_src (this is a made-up folder that no one will be curious about), so that i can hide it with the rest of the programs i need. I then downloaded Python 2.5 and all of the other requirements, which all had the same blue install screens that recognized Python 2.5 and installed themselves.

    So, now I seem to have all of the peices, all located in my C:\nt.dv.svid folder. All except for Python which is just in the main C folder. Now the directions start to confuse me.     *
              o Unzip the contents of the archive
              o Open a command prompt and 'cd' to the directory where you unzipped
              o Run "python setup.py install"

    I beleive this is referring to the ConfigObj dependency. I didnt do this, but i think it installed automatically (is that a problem?). I tried to go back and open a command prompt but when i type "python setup.py install" it tells me that Python is not a command, the same if i try typing it "as is", like Run "python setup.py install" (with quotations). Maybe this is not even a problem.

    The second problem, the real problem, is that there is no Keylogger.pyw for me to double click. So i dont know if my download or extraction was incomplete, or weather or not i simply dont understand the directions. I would try to run it from the console "(or run "python keylogger.pyw" from a terminal)", but as I said, python is not a command my computer recognizes in the console. I might be able to try to make an executable, but im not sure If i can bypass everything I just mentioned.

    anyway, im sure its clear i dont know computers very well. Windows makes my Ubuntu box seem easy. Could someone please try to explain in simple terms how i can finish this installation.

    Also, nowhere have a read the exact location to remove the nag screen or the expiration.

    Thanks!

     
    • nanotube
      nanotube
      2008-06-25

      first, i notice you are using an older version - newest one is 1.0.2. best to use that one.

      second: about unzip, commandprompt, etc - yes, that is referring just to configobj, which doesn't come with a one-click installer like all the other modules.

      python is not a command: that means that the path to python is not in your default search path, so you have to enter the full path to run python. it's probably in C:\Python25\python.exe. (look and see where exactly it is).

      So, for example, to install configobj, get the zip archive of configobj, unzip it somewhere, cd to that directory (the directory that contains the unzipped configobj), and enter
      C:\Python25\python.exe setup.py install

      the src archive /does/ contain keylogger.pyw. maybe you didn't extract all the files?
      also, to run it from console, again - since python is not in your default search path, you'd have to enter full path to python, instead of just "python"

      yes, ubuntu's nice. :) i've been using it as my desktop os for quite a bit now...

      finding the location of the nag screen in the source is up to you to figure out :). i'll just say that you'd do well to start looking in keylogger.pyw file, and go from there.

      let me know how it goes with all of that; post if you need further assistance.

       
    • Faery King
      Faery King
      2008-06-25

      Thanks for the reply, but my problems are far from solved.

      I did as you said and tried to run python.exe using the entire location name. That did nothing as it said the path was invalid. So i checked in the Python25 folder and checked and saw no exe file. So i reinstalled python and still no exe file. I do see a "python" labeled icon that brings up a terminal, but when i tried it without the exe it didnt work either. I can run the command Python but it does nothing for me but show me >>> and then not accept any commands. I tried "C\:Python25\python.exe setup.py install", I now understand there is a setup.py file that i see and it needs to be installed by the python.exe file or some other executable. But i have searched all over the Python25 folder and see no executable file.

      Fortunately I am learning from this. As far as the nag screen is concerned, I am not at all worried about the Nag but about the expiration. I live in Central America, which means it is impossible here for me or any normal person to pay 20 dollars for software. I could give you a dollar, which is probably the equivalent, considering North Americans probably make 100$ a day and a days pay here is 5$. regardless, I appreciate your contribution of time and probably money to make this tool.

       
    • Faery King
      Faery King
      2008-06-25

      Victory!!!. well partial. I couldnt seem to run python from the entire path name, but when i put the filed inside the Python25 folder along with Python, I was able to run ..\python setup.py install, and then i ran ..\python keylogger.pyw, which opened the file.

      Was the last command ..\python keylogger.pyw just a way to run it from source? To create an executable I first need to remove the nag + expiration date or it will still expire? Sorry for putting you through this.

       
    • Faery King
      Faery King
      2008-06-25

      I found the toggle for the nag and wrote False, thanks. I ran the program and it works great through ..\python keylogger.pyw but it says there is an error and runs this log file:

      C:\Python25\pykeylogger-1.0.2\dist\keylogger.exe:78: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
      Traceback (most recent call last):
        File "keylogger.pyw", line 348, in <module>
        File "keylogger.pyw", line 78, in __init__
      TypeError: Could not set hook
      C:\Python25\pykeylogger-1.0.2\dist\keylogger.exe:78: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
      Traceback (most recent call last):
        File "keylogger.pyw", line 348, in <module>
        File "keylogger.pyw", line 78, in __init__
      TypeError: Could not set hook
      C:\Python25\pykeylogger-1.0.2\dist\keylogger.exe:78: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
      Traceback (most recent call last):
        File "keylogger.pyw", line 348, in <module>
        File "keylogger.pyw", line 78, in __init__
      TypeError: Could not set hook
      C:\Python25\pykeylogger-1.0.2\dist\keylogger.exe:78: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
      Traceback (most recent call last):
        File "keylogger.pyw", line 348, in <module>
        File "keylogger.pyw", line 78, in __init__
      TypeError: Could not set hook

      I already ran debug and tried again

       
    • nanotube
      nanotube
      2008-06-25

      Hi,
      this "could not set hook" bit, could be due to a problem with the newest version of py2exe, which is 0.6.8.

      try installing py2exe 0.6.6, and try it again. a few people have suddenly started reporting a problem with compiling, so i suspect it's due to the newest py2exe version.

      also... do you have "show file extensions" option enabled in windows? i suspect that's the reason it doesn't show python's .exe extension. (if i recall, from a folder view, go to view -> folder options-> advanced -> show extensions for known file types, to enable this).

      also: remember that you have to give not only the full path to python, but also the full path to the python /file that you want to run/ (in this case, keylogger.pyw). copying it over to where python.exe is located works, but you really don't want to clog up python's install dir with a bunch of cruft, in the long term.

      anyway, try the older py2exe and see if it works. :)

       
    • Faery King
      Faery King
      2008-06-25

      I installed py2exe 6.6 but I didnt know how to uninstall 6.8. I hope it just installed over the other one. Anyway, I tried that and it made a executable file that I can run without a problem. It opens and gives me no error message. The only problem is that when I try to run it from startup, but I will get into that in the other thread. thanks

       
    • nanotube
      nanotube
      2008-06-27

      ok, well, at least the py2exe problem is solved. :)

       
  • Jay Sean
    Jay Sean
    2010-01-12

    Hi, I've read and understood up to the point of
    "So, for example, to install configobj, get the zip archive of configobj, unzip it somewhere, cd to that directory (the directory that contains the unzipped configobj)" Could you please explain how to cd to the directory. I do not really understand the term "cd" Thanks in advance.

     
  • nanotube
    nanotube
    2010-01-12

    Hi
    cd is a terminal (command prompt) command. open a command prompt, then use 'cd' (which stands for 'change directory'), to change to that directory.

    so let's say you open up a command prompt, by default you'll be in some directory like "C:\documents and settings\yourusername", and let's say you unzipped to Desktop to a 'configobj' directory. so on the commandprompt, you would type "cd Desktop\configobj" to change to that directory, and then your current directory is going to be "C:\documents and settings\yourusername\Desktop\configobj"

    since you're now in the dir where the setup.py is, you can run "python setup.py install" and it will know where to find setup.py.

    hope that helps…