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 23 Sep 2014, 06:24
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to protect quickly the file by means of password.
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: Sat 16 Jul 2011, 12:00    Post subject:  How to protect quickly the file by means of password.
Subject description: OS: "Quirky Linux - 1.40"
 

The script gives the opportunity to make the attempt in the deal of protection of the important files by means of archivator and password.

Removing of the "sed" program can cause the problems in the system.

Quote:

Install_SaveGuard--sr0.sh
Code:

#!/bin/bash
cd /tmp ;
curl -C - -O file:///mnt/sr0/SaveFiles/PCLinuxOS-2009_files/p7zip-9.04-1pclos2009.i586.rpm ;
if [ ! `echo -e "b7075f7ecff7608c91a495b7af8d7563  p7zip-9.04-1pclos2009.i586.rpm" | md5sum -c - >/tmp/.md-5.sm ; sleep 0.5s ; grep -o 'OK' /tmp/.md-5.sm` ] ; then xmessage -file /tmp/.md-5.sm ; else yaf-splash -bg purple -fg green -text "`cat /tmp/.md-5.sm`" ; fi ;
rpm -i p7zip-9.04-1pclos2009.i586.rpm ;
sleep 0.5s ;
rm /tmp/p7zip-9.04-1pclos2009.i586.rpm ;
rm /tmp/.md-5.sm ;
#1
#
sed -i".tmp" '/"SvGuard"/d' /root/Choices/ROX-Filer/PuppyPin ;
#
echo '[Desktop Entry]' > /usr/share/applications/SaveGuard.desktop ;
echo 'Encoding=UTF-8' >> /usr/share/applications/SaveGuard.desktop ;
echo 'Name=SaveGuard' >> /usr/share/applications/SaveGuard.desktop ;
echo 'Comment=The way to hide some files' >> /usr/share/applications/SaveGuard.desktop ;
#echo "Exec=rxvt --geometry 140x35 -e bash -c \"dialog --radiolist "'\"Choose: hide or bring back the object\"'" 15 140 10 "'\"ln -s \`mktemp 2>/dev/null\` /tmp/001 ; rxvt --geometry 50x50 -e bash -c \"'\''\"dialog --clear --insecure --passwordbox \"Password:\" 10 50 2>/tmp/001\"'\''\" ; cd /usr/local/bin/ ; 7za a -t7z -p\"'\''\`cat /tmp/001\`'\''\" -mhe linkpmc.7z pmusic ; rm /tmp/tmp.?????????? /tmp/001 /usr/local/bin/pmusic\"'" "'\"Hide\"'" on "'\"ln -s \`mktemp 2>/dev/null\` /tmp/001 ; rxvt --geometry 50x50 -e bash -c \"'\''\"dialog --clear --insecure --passwordbox \"Password:\" 10 50 2>/tmp/001\"'\''\" ; cd /usr/local/bin ; 7za e -p\"'\''\`cat /tmp/001\`'\''\" linkpmc.7z ; rm /tmp/tmp.?????????? /tmp/001 /usr/local/bin/linkpmc.7z\"'" "'\"Unhide\"'" off 2>/tmp/svgrd_tmp.sh ; chmod 550 /tmp/svgrd_tmp.sh ; bash -e /tmp/svgrd_tmp.sh ; rm /tmp/svgrd_tmp.sh\"" >>/usr/share/applications/SaveGuard.desktop ;
# # #echo "Exec=rxvt --geometry 25x17 -e bash -c \"dialog --radiolist "'\"  RULE the OBJECT: hide---::1st LINE:: unhide-::2nd LINE::\"'" 15 140 10 "'\"ln -s \`mktemp 2>/dev/null\` /tmp/001 ; rxvt --geometry 50x50 -e bash -c \"'\''\"dialog --clear --insecure --passwordbox \"Password:\" 10 50 2>/tmp/001\"'\''\" ; cd /bin/ ; 7za a -t7z -p\"'\''\`cat /tmp/001\`'\''\" -mhe linkpmc.7z mount sed ; rm /tmp/tmp.?????????? /tmp/001 /bin/mount /bin/sed\"'" "'\"Hide\"'" on "'\"ln -s \`mktemp 2>/dev/null\` /tmp/001 ; rxvt --geometry 50x50 -e bash -c \"'\''\"dialog --clear --insecure --passwordbox \"Password:\" 10 50 2>/tmp/001\"'\''\" ; cd /bin ; 7za e -p\"'\''\`cat /tmp/001\`'\''\" linkpmc.7z ; rm /tmp/tmp.?????????? /tmp/001 /bin/linkpmc.7z\"'" "'\"Unhide\"'" off 2>/tmp/svgrd_tmp.sh ; chmod 550 /tmp/svgrd_tmp.sh ; bash -e /tmp/svgrd_tmp.sh ; rm /tmp/svgrd_tmp.sh ; rm /tmp/001 ; rm /tmp/tmp.??????????\"" >>/usr/share/applications/SaveGuard.desktop ;
#
echo "Exec=rxvt --geometry 38x17 -e bash -c \"rm /tmp/tmp.?????????? ; dialog --radiolist "'\"  RULE the OBJECT: hide---::1st LINE:: unhide-::2nd LINE::\"'" 15 32 10 "'\"\`echo -e "'\"Hide needful files\"'"\`  >&/dev/null && sleep 0.1s ; ln -s \`mktemp 2>/dev/null\` /tmp/001 ; rxvt --geometry 50x50 -e bash -c \"'\''\"dialog --clear --insecure --passwordbox \"Password:\" 10 50 2>/tmp/001\"'\''\" ; cd /bin/ ; 7za a -t7z -p\"'\''\`cat /tmp/001\`'\''\" -mhe linkpmc.7z mount sed ; rm /tmp/tmp.?????????? /tmp/001 /bin/mount /bin/sed\"'" "'\":\"'" on "'\"\`echo -e "'\"Unhide needful files\"'"\` >&/dev/null && sleep 0.1s ; ln -s \`mktemp 2>/dev/null\` /tmp/001 ; rxvt --geometry 50x50 -e bash -c \"'\''\"dialog --clear --insecure --passwordbox \"Password:\" 10 50 2>/tmp/001\"'\''\" ; cd /bin ; 7za e -p\"'\''\`cat /tmp/001\`'\''\" linkpmc.7z ; rm /tmp/tmp.?????????? /tmp/001 /bin/linkpmc.7z\"'" "'\":\"'" off 2>/tmp/svgrd_tmp.sh ; chmod 550 /tmp/svgrd_tmp.sh ; bash -e /tmp/svgrd_tmp.sh ; rm /tmp/svgrd_tmp.sh ; rm /tmp/001 ; rm /tmp/tmp.??????????\"" >>/usr/share/applications/SaveGuard.desktop ;
#
echo 'Terminal=false' >> /usr/share/applications/SaveGuard.desktop ;
echo 'Type=Application' >> /usr/share/applications/SaveGuard.desktop ;
echo 'Categories=Utility' >> /usr/share/applications/SaveGuard.desktop ;
echo 'GenericName=Hide File Utility' >> /usr/share/applications/SaveGuard.desktop ;
echo 'Icon=/usr/local/lib/X11/themes/Smooth-Color/save48.png' >> /usr/share/applications/SaveGuard.desktop ;
#
#>>> "Hide needful files" >>>
#"\'\""Hide needful files"\"\'"
#<<<
#
sed -i".tmp" '/\/pinboard/d' /root/Choices/ROX-Filer/PuppyPin ;
sleep 1s ;
echo '<icon x="928" y="704" label="SvGuard">/usr/share/applications/SaveGuard.desktop</icon>' >> /root/Choices/ROX-Filer/PuppyPin ;
echo '</pinboard>' >> /root/Choices/ROX-Filer/PuppyPin ;
sleep 1s ;
#
rox -p=/root/Choices/ROX-Filer/PuppyPin
fixmenus
xmessage "Tool -=SvGuard=- has been installed." `jwm -restart`

#
#
#GOOD ONES:
#ONLY to PACK >>
#rxvt --geometry 140x35 -e bash -c "dialog --radiolist \"Choose: hide or bring back the object\" 15 140 10 \"ln -s \`mktemp 2>/dev/null\` /tmp/001 ; rxvt --geometry 50x50 -e bash -c \"'\"dialog --clear --insecure --passwordbox \"Password:\" 10 50 2>/tmp/001\"'\" ; cd /usr/bin ; 7za a -t7z -p\"'\`cat /tmp/001\`'\" -mhe linkvwnr.7z viewnior ; rm /tmp/tmp.?????????? /tmp/001 /usr/bin/viewnior\" \"Hide\" on 2>/tmp/svgrd_tmp.sh ; chmod 550 /tmp/svgrd_tmp.sh ; bash -e /tmp/svgrd_tmp.sh ; rm /tmp/svgrd_tmp.sh"

#to PACK and to UNPACK >>
#rxvt --geometry 140x35 -e bash -c "dialog --radiolist \"Choose: hide or bring back the object\" 15 140 10 \"ln -s \`mktemp 2>/dev/null\` /tmp/001 ; rxvt --geometry 50x50 -e bash -c \"'\"dialog --clear --insecure --passwordbox \"Password:\" 10 50 2>/tmp/001\"'\" ; cd /usr/bin ; 7za a -t7z -p\"'\`cat /tmp/001\`'\" -mhe linkvwnr.7z viewnior ; rm /tmp/tmp.?????????? /tmp/001 /usr/bin/viewnior\" \"Hide\" on \"ln -s \`mktemp 2>/dev/null\` /tmp/001 ; rxvt --geometry 50x50 -e bash -c \"'\"dialog --clear --insecure --passwordbox \"Password:\" 10 50 2>/tmp/001\"'\" ; cd /usr/bin ; 7za e -p\"'\`cat /tmp/001\`'\" linkvwnr.7z ; rm /tmp/tmp.?????????? /tmp/001 /usr/bin/linkvwnr.7z\" \"Unhide\" off 2>/tmp/svgrd_tmp.sh ; chmod 550 /tmp/svgrd_tmp.sh ; bash -e /tmp/svgrd_tmp.sh ; rm /tmp/svgrd_tmp.sh"


Edit: 2011, nov 19.


Removing of the "sed" program can cause the problems in the system.

A script's content can be copied into text editor by means of <Quote> mode.

Addition:
If there is such a program in the Operating System as GEANY, then the user has an opportunity to edit '/usr/share/applications/SaveGuard.desktop' file through such a built-in function as SEARCH.

Note:
The target directory is the only field for actions, i.e. those files which must be hidden do exist in the target directory.

Examples:
[ > ] To delete earlier created targets: the user searches the word -=sed=- and deletes the found word and deletes the single textual stick which consists of the found word and other words.
Quote:

the chosen targets are shown through underlining
Quote:

-mhe lsf.7z mount sed ; mv lsf.7z lsf.sh ; rm /tmp/tmp.?????????? /tmp/001 /bin/mount /bin/sed\" \":\" on



[ > ] To create new targets: the user searches the word -=mount=- and adds the new words.
Quote:

the chosen targets are shown through underlining
Quote:

-mhe lsf.7z mount mount-FULL ; mv lsf.7z lsf.sh ; rm /tmp/tmp.?????????? /tmp/001 /bin/mount /bin/mount-FULL\" \":\" on



[ > ] To change target directory:
1)the user searches the textual object -=cd /bin=- and creates a new object -=cd /sbin=- instead of -=cd /bin=-.
2)the user searches the textual object -=/bin/lsf.7z=- and creates a new object -=/sbin/lsf.7z=- instead of -=/bin/lsf.7z=-.
Quote:

the chosen targets are shown through underlining
Quote:

cd /bin/ ; 7za a -t7z -p\"'\`cat /tmp/001\`'\" -mhe lsf.7z mount sed ; mv lsf.7z lsf.sh ; rm /tmp/tmp.?????????? /tmp/001 /bin/mount /bin/sed\" \":\" on \"\`echo -e ""Unhide needful files""\` >&/dev/null && sleep 0.1s ; ln -s \`mktemp 2>/dev/null\` /tmp/001 ; rxvt --geometry 50x50 -e bash -c \"'\"dialog --clear --insecure --passwordbox \"Password:\" 10 50 2>/tmp/001\"'\" ; cd /bin ; mv lsf.sh lsf.7z ; 7za e -p\"'\`cat /tmp/001\`'\" lsf.7z ; rm /tmp/tmp.?????????? /tmp/001 /bin/lsf.7z


_________________
  • I don't know why laboratories are named a hospitals.
  • The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.


Last edited by postfs1 on Sun 03 Feb 2013, 19:15; edited 10 times in total
Back to top
View user's profile Send private message 
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: Sat 19 Nov 2011, 16:24    Post subject:  

Also, in this topic is shown a way how to hide needful commands in the "dialog" program's box. Maybe the way is not perfect, but it works.
_________________
  • I don't know why laboratories are named a hospitals.
  • The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.0742s ][ Queries: 11 (0.0069s) ][ GZIP on ]