Needed: Program to store key typing into text boxes[Found]

Requests go here. If you fill a request, give it a new thread in the appropriate category and then link to it in the request thread.
Message
Author
User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#31 Post by Geoffrey »

april wrote:Yes but your script does not appear to run on mine. Should I remove /root/Startup/.pkl .Will that make yours start . I get nothing when I do that atm.
I have your second script in /root/Startup/ and have changed the permissions to executeable but checking running processes there is nothing started?
Ok, It's yad, precise yad version is at fault, I can't get a functional right click menu with yad 0.12.4.

Heres a yad I compiled in precise 5.7.1, yad-0.37.0, it's the latest and afaik the last that supports gtk2.

this revised script will first kill the logger if it is running, then restarts it with the timestamp disabled


Code: Select all

#!/bin/bash
# MyKeylog

ps ax | grep -q '[My]Keylog' && exit 1
logkeys -k >/dev/null 2>&1 
KEYLOG=`awk 'NR==2' < /root/Startup/.pkl` 
KEYLOG=`echo "$KEYLOG" | awk -F'-o' '{print $1}'`
eval "$KEYLOG"--no-timestamps -o /var/log/kp/secret-keys.log
function my_keylog () {
ps ax | grep -q '[MY]KEYLOG' && kill $(ps -ef | awk '/[MY]KEYLOG/{print $2}') && exit 1
    export MYKEYLOG='
<window title="MyKeylog" icon-name="gtk-edit">
  <vbox>
    <edit file-monitor="true" auto-refresh="true" wrap-mode="3" editable="true">
    <variable>MY_KEYLOG</variable>
    <input file>/var/log/kp/secret-keys.log</input>
    </edit>
    <hbox homogeneous="true">
    <hbox>
      <button>
        <label>Save</label>
        <input file stock="gtk-save"></input>
        <action>`echo "$MY_KEYLOG" > /var/log/kp/secret-keys.log`</action>
      </button>
    </hbox>
    </hbox>
  </vbox>
</window>'
gtkdialog -p MYKEYLOG -G 400x200"+`getcurpos | tr " " "+"`"
}
export -f my_keylog

function killkeylog () {
logkeys -k   
kill $(ps -ef | awk '/[MY]KEYLOG/{print $2}')
kill $(ps -ef | awk '/[t]ext=MyKeylog/{print $2}')
}
export -f killkeylog

mkfifo /tmp/mykeylog >/dev/null 2>&1
exec 3<> /tmp/mykeylog

exec yad --notification --no-middle --text=$"MyKeylog" --image="gtk-edit" --command "sh -c 'my_keylog >/dev/null 2>&1'" --listen <&3 &

echo "menu:Exit!sh -c 'killkeylog >/dev/null 2>&1'!gtk-cancel" >&3
Attachments
yad-0.37.0.tar.gz
(71.13 KiB) Downloaded 155 times
keylog.jpg
(47.56 KiB) Downloaded 298 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

april

#32 Post by april »

OK yad is bringing up a dialog box when I run it but with the new script I still have nothing in the tray.?
Nothing running either and nothing in the log file

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#33 Post by Geoffrey »

april wrote:OK yad is bringing up a dialog box when I run it but with the new script I still have nothing in the tray.?
Nothing running either and nothing in the log file
Can you post the content of your /root/Startup/.pkl file.
The yad script should work, I'm running it in a clean install of precise 5.7.1 with only the new yad and pklogger installed, it's working fine for me.
Attachments
mykeylog.tar.gz
(814 Bytes) Downloaded 109 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

april

#34 Post by april »

Code: Select all

#!/bin/sh
logkeys -s  --us-keymap --no-func-keys -o /var/log/kp/secret-keys.log
I took the -m out as per your notes

testkp.sh will run the original dialog box-Im using it so its still in now . To see if yours runs I take it out.
Attachments
Keyloggerscreenshot.png
(177.41 KiB) Downloaded 221 times
Last edited by april on Sun 06 Nov 2016, 22:53, edited 1 time in total.

april

#35 Post by april »

Can you just tell me what I should have in /root/Startup/ to run your script please Geoffrey?

BTW You can get pklogger-0.4.pet from github/pklogger or in a terminal --

Code: Select all

 wget --no-check-certificate http://repo.gentoo-es.com/PuppyLinux-repositorios/Pupjibaro/3.2.48/pklogger-0.4.pet
#v0.4 Geoffrey fix added 11032016, orange color
http://repo.gentoo-es.com/PuppyLinux-re ... er-0.4.pet

april

#36 Post by april »

Can you just tell me what I should have in /root/Startup/ to run your script please Geoffrey?
Your script runs without any reported error in a terminal but no GUI shows up?
Last edited by april on Sun 06 Nov 2016, 22:58, edited 1 time in total.

User avatar
nilsonmorales
Posts: 972
Joined: Fri 15 Apr 2011, 14:39
Location: El Salvador

#37 Post by nilsonmorales »

When we began to think about a GUI for logkeys, as a joke we thought of an application to 'spy', something for 'jealous husbands', like secretly checking who and what is writing in our computers, for that reason we didn't thought of putting anything on the system tray. Neither José nor I have experience writing code, that's why the GUI may have bugs, but for the same reason it is in GitHub in the hope that someone is able to improve the code. The application is opensource if you want to improve it, we'll be happy and satisfied for that.
[b][url=http://nilsonmorales.blogspot.com/]My blog |[/url][/b][b][url=https://github.com/woofshahenzup]| Github[/url][/b]
[img]https://i.postimg.cc/5tz5vrrX/imag018la6.gif[/img]
[img]http://s5.postimg.org/7h2fid8pz/botones_logos3.png[/img]

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#38 Post by Geoffrey »

april wrote:Can you just tell me what I should have in /root/Startup/ to run your script please Geoffrey?
Your script runs without any reported error in a terminal but no GUI shows up?
I made a pet for the gui, it has a menu entry in Utility and the tray editor has a option to enable it to run at startup.

Give it try, it works for me ok, make sure you have the new yad installed else it won't work.
Attachments
mykeylog-1.0.pet
(36.72 KiB) Downloaded 152 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

april

#39 Post by april »

nilsonmorales wrote:When we began to think about a GUI for logkeys, as a joke we thought of an application to 'spy', something for 'jealous husbands', like secretly checking who and what is writing in our computers, for that reason we didn't thought of putting anything on the system tray. Neither José nor I have experience writing code, that's why the GUI may have bugs, but for the same reason it is in GitHub in the hope that someone is able to improve the code. The application is opensource if you want to improve it, we'll be happy and satisfied for that.
Fine I understand that . I wondered how practical that would be because it is not sustained on boot or shutdown so the user at the time would have to start it after bootup in a terminal each time so you would have to leave your machine running all the time to catch anybody.

If I get time I will see if I can get it to be persistent and update github . Maybe Geoffrey will put his script there for you.

april

#40 Post by april »

Geoffrey wrote:I made a pet for the gui, it has a menu entry in Utility and the tray editor has a option to enable it to run at startup.

Give it try, it works for me ok, make sure you have the new yad installed else it won't work.
OK we are progressing . I now have a menu entry for Mykeylog and it is recording keystrokes to the log file without timestamps -Thanks

No GUI or tray editor though so there must be something else I don't have running . I have the newer Yad and it seems to be running properly on test.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#41 Post by Geoffrey »

april wrote:
Geoffrey wrote:I made a pet for the gui, it has a menu entry in Utility and the tray editor has a option to enable it to run at startup.

Give it try, it works for me ok, make sure you have the new yad installed else it won't work.
OK we are progressing . I now have a menu entry for Mykeylog and it is recording keystrokes to the log file without timestamps -Thanks

No GUI or tray editor though so there must be something else I don't have running . I have the newer Yad and it seems to be running properly on test.
Weird, you have precise 5.7.1? there should be an icon in the tray with the same icon as in the utility menu,
if you left click on it the editor will show, right click a menu with exit will appear, I don't understand why it is not working for you.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

april

#42 Post by april »

Yes I am running Prcise 5.7.1

Experimenting ,the line

Code: Select all

exec yad --notification --no-middle --text=$"MyKeylog" --image="gtk-edit" --command "sh -c 'my_keylog >/dev/null 2>&1'" --listen <&3 &
changed to --listen <&2 &

And the icon in the tray shows. Still nothing on right or left click on it though

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#43 Post by Geoffrey »

april wrote:Yes I am running Prcise 5.7.1

Experimenting ,the line

Code: Select all

exec yad --notification --no-middle --text=$"MyKeylog" --image="gtk-edit" --command "sh -c 'my_keylog >/dev/null 2>&1'" --listen <&3 &
changed to --listen <&2 &

And the icon in the tray shows. Still nothing on right or left click on it though
The menu is echoed to >&3 and is listened <&3

Code: Select all

mkfifo /tmp/mykeylog >/dev/null 2>&1
exec 3<> /tmp/mykeylog

exec yad --notification --no-middle --text=$"MyKeylog" --image="gtk-edit" --command "sh -c 'my_keylog >/dev/null 2>&1'" --listen <&3 &

echo "menu:Exit!sh -c 'killkeylog >/dev/null 2>&1'!gtk-cancel" >&3
This has worked for me on precise 5.7.1, X-Slack0, the only thing was to update yad to obtain the extra features the newer yad offered,
the main one of interest to me was --no-middle to disable the mouse button as so it didn't kill the tray app leaving no way to stop the logkeys process.

Try this, make sure that mykeylog isn't running, in the terminal run mykeylog, then right click the tray icon to see if there's an error of some sort.

To make sure you have the correct yad version, in the terminal type

Code: Select all

yad --version
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

april

#44 Post by april »

The yad you gave above extracts as 12.4 ! This would be the problem. Can you change that please?

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#45 Post by Geoffrey »

april wrote:The yad you gave above extracts as 12.4 ! This would be the problem. Can you change that please?
I download and checked the yad-0.37.0.tar.gz, it is correct, it's version 0.37.0, maybe you didn't replace the existing 0.12.4 in /usr/bin with the new one.

Code: Select all

# yad --version
0.37.0 (GTK+ 2.24.10)
It doesn't extract to /usr/bin you need to replace it manually, or extract it to /usr/bin
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

april

#46 Post by april »

Yep got the yad right now . opened a terminal where I d/ld it to and expected it to use the current directory first . It didn't

april

#47 Post by april »

Also rebooted and all working fine as you expected Thanks !
Now to get it on my other machines
Sure appreciate your time

Post Reply