Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 26 May 2017, 13:09
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Needed: Program to store key typing into text boxes[Found]
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 4 [47 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
Geoffrey


Joined: 30 May 2010
Posts: 2265
Location: Queensland

PostPosted: Fri 04 Nov 2016, 21:00    Post subject:  

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:
#!/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
yad-0.37.0.tar.gz
Description 
gz

 Download 
Filename  yad-0.37.0.tar.gz 
Filesize  71.13 KB 
Downloaded  21 Time(s) 
keylog.jpg
 Description   
 Filesize   47.56 KB
 Viewed   238 Time(s)

keylog.jpg


_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 924
Location: Burning up on the Great Barrier Reef (Mostly Dead or Dying(me too))

PostPosted: Sat 05 Nov 2016, 05:16    Post subject:  

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
Back to top
View user's profile Send private message Yahoo Messenger 
Geoffrey


Joined: 30 May 2010
Posts: 2265
Location: Queensland

PostPosted: Sat 05 Nov 2016, 06:49    Post subject:  

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.
mykeylog.tar.gz
Description 
gz

 Download 
Filename  mykeylog.tar.gz 
Filesize  814 Bytes 
Downloaded  20 Time(s) 

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 924
Location: Burning up on the Great Barrier Reef (Mostly Dead or Dying(me too))

PostPosted: Sat 05 Nov 2016, 17:04    Post subject:  

Code:
#!/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.
Keyloggerscreenshot.png
 Description   
 Filesize   177.41 KB
 Viewed   162 Time(s)

Keyloggerscreenshot.png


Last edited by april on Sun 06 Nov 2016, 18:53; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger 
april


Joined: 14 Sep 2013
Posts: 924
Location: Burning up on the Great Barrier Reef (Mostly Dead or Dying(me too))

PostPosted: Sat 05 Nov 2016, 21:59    Post subject:  

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:
 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-repositorios/Pupjibaro/3.2.48/pklogger-0.4.pet
Back to top
View user's profile Send private message Yahoo Messenger 
april


Joined: 14 Sep 2013
Posts: 924
Location: Burning up on the Great Barrier Reef (Mostly Dead or Dying(me too))

PostPosted: Sun 06 Nov 2016, 14:30    Post subject:  

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, 18:58; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger 
nilsonmorales


Joined: 15 Apr 2011
Posts: 904
Location: El Salvador

PostPosted: Sun 06 Nov 2016, 16:18    Post subject:  

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.
_________________
My blog | | Github


Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2265
Location: Queensland

PostPosted: Sun 06 Nov 2016, 22:32    Post subject:  

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.
mykeylog-1.0.pet
Description 
pet

 Download 
Filename  mykeylog-1.0.pet 
Filesize  36.72 KB 
Downloaded  22 Time(s) 

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 924
Location: Burning up on the Great Barrier Reef (Mostly Dead or Dying(me too))

PostPosted: Mon 07 Nov 2016, 02:43    Post subject:  

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.
Back to top
View user's profile Send private message Yahoo Messenger 
april


Joined: 14 Sep 2013
Posts: 924
Location: Burning up on the Great Barrier Reef (Mostly Dead or Dying(me too))

PostPosted: Mon 07 Nov 2016, 02:55    Post subject:  

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.
Back to top
View user's profile Send private message Yahoo Messenger 
Geoffrey


Joined: 30 May 2010
Posts: 2265
Location: Queensland

PostPosted: Mon 07 Nov 2016, 03:22    Post subject:  

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.

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 924
Location: Burning up on the Great Barrier Reef (Mostly Dead or Dying(me too))

PostPosted: Mon 07 Nov 2016, 06:02    Post subject:  

Yes I am running Prcise 5.7.1

Experimenting ,the line
Code:
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
Back to top
View user's profile Send private message Yahoo Messenger 
Geoffrey


Joined: 30 May 2010
Posts: 2265
Location: Queensland

PostPosted: Mon 07 Nov 2016, 17:39    Post subject:  

april wrote:
Yes I am running Prcise 5.7.1

Experimenting ,the line
Code:
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:
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:
yad --version

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

Back to top
View user's profile Send private message 
april


Joined: 14 Sep 2013
Posts: 924
Location: Burning up on the Great Barrier Reef (Mostly Dead or Dying(me too))

PostPosted: Mon 07 Nov 2016, 21:05    Post subject:  

The yad you gave above extracts as 12.4 ! This would be the problem. Can you change that please?
Back to top
View user's profile Send private message Yahoo Messenger 
Geoffrey


Joined: 30 May 2010
Posts: 2265
Location: Queensland

PostPosted: Mon 07 Nov 2016, 21:23    Post subject:  

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:
# 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

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 4 [47 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3782s ][ Queries: 14 (0.0209s) ][ GZIP on ]