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 Tue 27 Jun 2017, 20:47
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 2 of 4 [47 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
greengeek


Joined: 20 Jul 2010
Posts: 4583
Location: New Zealand

PostPosted: Tue 01 Nov 2016, 23:28    Post subject:  

What puppy are you running? I just compiled logkeys for my slacko 5.6 deivative and it works great.
Back to top
View user's profile Send private message 
nilsonmorales


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

PostPosted: Tue 01 Nov 2016, 23:33    Post subject:  

https://github.com/Woofshahenzup/pklogger
http://repo.gentoo-es.com/PuppyLinux-repositorios/Pupjibaro/3.2.48/pklogger-0.3.pet

_________________
My blog | | Github


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


Joined: 20 Jul 2010
Posts: 4583
Location: New Zealand

PostPosted: Wed 02 Nov 2016, 03:44    Post subject:  

nilsonmorales wrote:
http://repo.gentoo-es.com/PuppyLinux-repositorios/Pupjibaro/3.2.48/pklogger-0.3.pet

Hmmm, looks great - but doesn't seem to log anything on my slacko 5.6

I will keep trying.

EDIT : it seems to create the kp directory but there is no log file inside it.
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2280
Location: Queensland

PostPosted: Wed 02 Nov 2016, 07:03    Post subject:  

greengeek wrote:
nilsonmorales wrote:
http://repo.gentoo-es.com/PuppyLinux-repositorios/Pupjibaro/3.2.48/pklogger-0.3.pet

Hmmm, looks great - but doesn't seem to log anything on my slacko 5.6

I will keep trying.

EDIT : it seems to create the kp directory but there is no log file inside it.


I got it to work from command line
Code:
logkeys -s -u --no-timestamps -o ~/.secret-keys.log


to kill the process
Code:
logkeys -k


Code:
# logkeys
Usage: logkeys [OPTION]...
Log depressed keyboard keys.

  -s, --start               start logging keypresses
  -m, --keymap=FILE         use keymap FILE
  -o, --output=FILE         log output to FILE [/var/log/logkeys.log]
  -u, --us-keymap           use en_US keymap instead of configured default
  -k, --kill                kill running logkeys process
  -d, --device=FILE         input event device [eventX from /dev/input/]
  -?, --help                print this help screen
      --export-keymap=FILE  export configured keymap to FILE and exit
      --no-func-keys        log only character keys
      --no-timestamps       don't prepend timestamps to log file lines
      --post-http=URL       POST log to URL as multipart/form-data file
      --post-size=SIZE      post log file when size equals SIZE [500k]

Examples: logkeys -s -m mylang.map -o ~/.secret-keys.log
          logkeys -s -d event6
          logkeys -k

logkeys version: 0.1.1b-svn
logkeys homepage: <http://code.google.com/p/logkeys/>

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

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


Joined: 30 May 2010
Posts: 2280
Location: Queensland

PostPosted: Wed 02 Nov 2016, 15:59    Post subject:  

greengeek wrote:
it seems to create the kp directory but there is no log file inside it.


I found the problem, it trys to use
Code:
-m --us-keymap
when US keyboard is selected, there is no map for the us keyboard, the /usr/bin/kp-map needs to be edited line 38 from this
Code:
logkeys -s -m --us-keymap --no-func-keys -o /var/log/kp/secret-keys.log
to this
Code:
logkeys -s -u --no-func-keys -o /var/log/kp/secret-keys.log

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

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


Joined: 20 Jul 2010
Posts: 4583
Location: New Zealand

PostPosted: Wed 02 Nov 2016, 17:20    Post subject:  

Hey, good find! I did select us keymap so hopefully that is the problem. Will test later tonight I hope.
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 2280
Location: Queensland

PostPosted: Wed 02 Nov 2016, 19:28    Post subject:  

greengeek wrote:
Hey, good find! I did select us keymap so hopefully that is the problem. Will test later tonight I hope.


Just removing the -m fixes it

from
Code:
logkeys -s -m --us-keymap --no-func-keys -o /var/log/kp/secret-keys.log


to
Code:
logkeys -s --us-keymap --no-func-keys -o /var/log/kp/secret-keys.log

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

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


Joined: 30 May 2010
Posts: 2280
Location: Queensland

PostPosted: Wed 02 Nov 2016, 19:39    Post subject:  

Here's a script that works with nilsonmorales pklogger-0.3.pet, it will put a gtkdialog text edit in the tray.

The keylogger runs on running the script and stops when the tray app is exited, right click the icon for the exit menu, clicking the tray icon toggles the edit window.

You still need to configure pklogger prior to running the script to set the key map, as I mentioned the kp-map script needs the US map fixed to work.
Code:
logkeys -s --us-keymap --no-func-keys -o /var/log/kp/secret-keys.log


Code:
#!/bin/bash
# MyKeylog
# By Geoffrey

ps ax | grep -q '[My]Keylog' && exit 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 # no timestamps
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

function about () {
yad --title="About MyKeylog" --close-on-unfocus --geometry=200x100"+`getcurpos | tr " " "+"`" --text-align="center" --skip-taskbar --window-icon="gtk-dialog-info" \
--text="
MyKeylog
   
By Geoffrey
 
03/11/2016
 
" --no-buttons --timeout="5"
}
export -f about

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:About!bash -c about!gtk-about|Exit!sh -c 'killkeylog >/dev/null 2>&1'!gtk-quit" >&3
mykeylog.png
 Description   
 Filesize   54.45 KB
 Viewed   199 Time(s)

mykeylog.png


_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

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


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

PostPosted: Wed 02 Nov 2016, 23:42    Post subject:  

Thank you Geoffrey, i will commit your fixes and update the pklogger.
_________________
My blog | | Github


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


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

PostPosted: Thu 03 Nov 2016, 20:58    Post subject:  

Yes thanks Geoffrey and nilsonmorales .

Seems to work atm only when I start it . I put your script in /root/Startup so hopefully it will run forever more .(Whoops noticed thats not needed so I removed that)(No it does not seem to start automatically from ".pkl" either. I have to run kp in a terminal each time and choose to start it ) Why are these things always marred by problems?
Its pretty easy . I just want it to run automatically every time I run my computer.



It doesn't happen to RoundRobin does it? I'll just have to edit it from time to time .
Oh and i don't get an icon in the tray and no menu entry Geoffrey . Is that what you meant to happen?
Using Precise 5.7.1

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


Joined: 30 May 2010
Posts: 2280
Location: Queensland

PostPosted: Thu 03 Nov 2016, 22:40    Post subject:  

april wrote:
Yes thanks Geoffrey and nilsonmorales . I used /usr/bin/kp-map as was so perhaps he has fixed that. I use the us keyboard anyhow.

Seems to work atm . I put your script in /root/Startup so hopefully it will run forever more . I'll just have to edit it from time to time .

It doesn't happen to RoundRobin does it?
Oh and i don't get an icon in the tray
Using Precise 5.7.1


It needs a recent version of yad to work, precise has yad 0.12.4, yad 0.26.1 will work but not the --close-on-unfocus option in the about menu, not that you need it, also the stock icons gtk-about and gtk-quit aren't found in precise.

I installed precise 5.7.1 added the pklogger-0.3.pet, mustn't be fixed yet as I had to edit the kp-map script for US keyboard.

T̶h̶i̶s̶ ̶w̶i̶l̶l̶ ̶w̶o̶r̶k̶ ̶w̶i̶t̶h̶ ̶y̶a̶d̶ ̶v̶e̶r̶s̶i̶o̶n̶ ̶0̶.̶1̶2̶.̶4̶

Edit: The old precise yad 0.12.4 doesn't support some feature of newer yad code.

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE


Last edited by Geoffrey on Fri 04 Nov 2016, 19:45; edited 1 time in total
Back to top
View user's profile Send private message 
april


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

PostPosted: Fri 04 Nov 2016, 01:38    Post subject:  

Tried this on another machine but still have to start it with kp so I don't understand what your script is doing Geoffrey.

nilsonmorales I would like to edit your configuration file to suit me then have it start at boot thereafter and always run. What command can I use in /root/Start/ folder to achieve this .

I see it is option 2 and your code uses the following
Code:
if [ "$r" == "2" ];then
chmod +x /root/Startup/.pkl && /root/Startup/.pkl
Xdialog --rc-file /root/.color.rc --title "keylogger" --icon '/usr/share/icons/espia.png' --msgbox "$(gettext 'keylogger Enable -
      Log is stored in
/var/log/kp/secret-keys.log ')" 10 40 && /usr/bin/kp
   exit ## Exit Script ##
fi


If I make this a script would that start it automatically? or can you suggest a more simple way
Thanks

I have done this above and just edited out chunks of the code just to test this . It seems to be starting automatically at least and recording but I would like to get the GUI in the tray and accessible

Quote:
Logging started ...

2016-11-04 15:58:09+1000 > 1<#+7>21<#+65>

Logging stopped at 2016-11-04 16:00:16+1000

Logging started ...

2016-11-04 16:01:22+1000 >
2016-11-04 16:02:54+1000 >
2016-11-04 16:02:54+1000 > I have done this above and just edited out the chunks of the code just to test this . It seems to be starting automatically at least and recording but I would like to get the GUI in the tray. and accessible


So I am guessing it will start a new file each boot this way.

OK so now I have edited it down to a 1 line script an put this in Startup
Code:
#!/bin/sh
chmod +x /root/Startup/.pkl && /root/Startup/.pkl

Giving after reboot
Quote:
Logging started ...

2016-11-04 15:58:09+1000 > 1<#+7>21<#+65>

Logging stopped at 2016-11-04 16:00:16+1000

Logging started ...

2016-11-04 16:01:22+1000 >
2016-11-04 16:02:54+1000 >
2016-11-04 16:02:54+1000 > I have done this above and just edited out the chunks of the code just to test this . It seems to be starting automatically at least and recording but I would like to get the GUI in the tray. and accessible
2016-11-04 16:06:13+1000 >
2016-11-04 16:06:13+1000 >
2016-11-04 16:06:25+1000 >
2016-11-04 16:06:26+1000 > So I am guessing it will start a new file each boot this way.##

Logging stopped at 2016-11-04 16:11:16+1000

Logging started ...

2016-11-04 16:12:22+1000 >
2016-11-04 16:13:09+1000 >
2016-11-04 16:13:09+1000 > OK so now I have edited it down to a 1 line script an put this in Startup
2016-11-04 16:13:41+1000 >
2016-11-04 16:14:48+1000 > Giving after reboot
2016-11-04 16:14:59+1000 >


So it is adding to the file each boot and I can easily run the clean line if I need it .

Looks like apart from input from nilsonmorales and maybe getting the tray GUI to work which is what I think you intend Geoffrey I'm getting somewhere Thanks Guys
Back to top
View user's profile Send private message Yahoo Messenger 
Geoffrey


Joined: 30 May 2010
Posts: 2280
Location: Queensland

PostPosted: Fri 04 Nov 2016, 02:23    Post subject:  

april wrote:
Tried this on another machine but still have to start it with kp so I don't understand what your script is doing Geoffrey.

nilsonmorales I would like to edit your configuration file to suit me then have it start at boot thereafter and always run. What command can I use in /root/Start/ folder to achieve this .

I see it is option 2 and your code uses the following
Code:
if [ "$r" == "2" ];then
chmod +x /root/Startup/.pkl && /root/Startup/.pkl
Xdialog --rc-file /root/.color.rc --title "keylogger" --icon '/usr/share/icons/espia.png' --msgbox "$(gettext 'keylogger Enable -
      Log is stored in
/var/log/kp/secret-keys.log ')" 10 40 && /usr/bin/kp
   exit ## Exit Script ##
fi


If I make this a script would that start it automatically? or can you suggest a more simple way
Thanks


april, nilsonmorales script places /root/Startup/.pkl, the .pkl should run the logger on startup every time by making .pkl executable.

My script doesn't need the /root/Startup/.pkl to be executable, it reads the content of this script and strips every thing after and including the "-o" then adds " --no-timestamps -o /var/log/kp/secret-keys.log ".

There is no need to have the key logger running as my script starts it and stops the logger when the tray app is closed

This makes for a better looking text that's easier to copy from without all the time stamps on every line.

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE

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


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

PostPosted: Fri 04 Nov 2016, 15:44    Post subject:  

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


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

PostPosted: Fri 04 Nov 2016, 19:20    Post subject:  

nilsonmorales- Your pet as installed at present brings up your fine dialog box but takes some 4 keystrokes to get rid of . Yes ,it is still turned on then, but keystrokes are a pain and in its present form it would not last very long before I chucked it.

I would suggest to you that, having it come up as a tray applet only, on boot with the option to start that tray dialog box and an option to have it turn on at bootup ,would be the way to go . The rest of it is excellent .Thanks for the app I will follow you on github.
Back to top
View user's profile Send private message Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 2 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.0637s ][ Queries: 14 (0.0049s) ][ GZIP on ]