There is an error in the HOWTO
The changes.lzm file should be placed in the BT3/modules folder and not the BT3/base folder, at least on the USB install.
great
good
ok
bad
horable!
Hi all you BackTrackers! Are you tired of useing:
???Code:dir2lzm /mnt/live/memory/changes changes.lzm; mv changes.lzm /mnt/sdb1/BT3/base
What if you could do all that and more with just:
Now wouldn't that be better??Code:save
Well, i have a way. Not only will this save your current changes, but it will merge them with the old! So after awhile you done end up with 50 files.
now lets do some background of the script. its FULLY automated! all you need is to have your BT3 folder on the root of your USB drive (if you can boot with out..let me know) and only that drive.
NOTE!: if you have a folder named "BT3" on the root of any other drive the script will get confused and may save the file on the wrong drive or produce unexpected results.
So first things first; lets make sure your in the HOME directory
Code:cd ~Next lets make the script make a file named "save.sh"."cd is a unix command that is used to "Change Directory"
Code:touch save.sh"touch" is commonly used to make/create files from shellNow lets just make sure its executable before we forget.NOTE: you can do that in Konqueror if you feel more comfertable
Code:chmod 755 save.shnow lets open the file and copy and past this scriptNow most of you programers know this part but "chmod" changes the mode of the file. if you simply try to run save.sh you will get:
-bash: ./save.sh: Permission denied
this means in its current mode it can not be executed
now save and exit.Code:#!/bin/sh #NAME: save.sh #AUTHOR: pc #COMPANY: pcap #EMAIL: none...that you need... #INFO: this is a script i made to merge two .lzm #files to keep up to date and to make backtrack easy to use USBDRIVE=`find /mnt/*/BT3 -maxdepth 0` lzmdir=${USBDRIVE}/base/ changes=/mnt/live/memory/changes tempTEMP=/tmp/TEMP/ tempdir=/tmp/ lzm=changes.lzm if [ -s ${lzmdir}/$lzm ]; then echo "changes.lzm found. mergeing old and new." mkdir ${tempTEMP} mv $lzmdir$lzm ${tempTEMP}$lzm lzm2dir ${tempTEMP}$lzm ${changes} rm -r ${tempTEMP} dir2lzm ${changes} $lzm -skipcheck mv $lzm ${lzmdir}$lzm exit else echo "change.lzm not found. making a new one." dir2lzm ${changes} $lzm -skipcheck mv $lzm ${lzmdir}$lzm exit fi
WOOH thats not that hard was it?...good...
On to the good stuff: lets put it in place so we can make sure it doesn't get harmed. lets put it in the /usr directory (you can put this any wareas long as you remember you put it, this is just so its out of the way.)
you can do this in Konqueror or just type
So after that we need to do some more things. we need to make a .profile file. but we need it make it in the home folder (we cannot just edit .bashrc or even /etc/.profile the changes to the file will not be saved. or atleast i cant get them to save for me)Code:mv ~/save.sh /usr/save.sh
So lets make the .profile file.
And make it accessible.Code:touch ~/.profile
now lets put in the aliasesCode:chmod 755 ~/.profile
NOTE!: if you have any other aliases you need to copy them to this new file or else they will not work!
Code:#my alias's for speed of hacking and conveanince unalias -a alias save='/usr/save.sh' #PUT YOUR OTHER ALIASES IN THIS FILENOTE: you can put other aliases in this file or even change what the alias is. like change"save" to "changes" or even "beef" anything you want!Well thats nice. were all most done!ANOTHER NOTE: the part where it says " '/usr/save.sh' " IF you changed where the file is, this is where you put the file! or it will not work
lets make our "save" command work
and now...LETS SAVE!!!Code:source ~/.profile
wow that was alot but its worth it dont you think?Code:save
WERE DONE!!!! YAY!!!! now if you want to learn more Bourne shell. you can go ooblick.com/text/sh/ (sorry about the weird format i cant post urls yet
---------------
MY ~/.profile
---------------
well i hope this was help full. so if you have modifications or improvements to this script please tell meCode:#my alias's for speed of hacking and conveanince unalias -a #lists all with more detail alias dir='dir -al --color' #lists all in detail and on page by page alias dirp='dir -al --color |more' #lists all alias lA='ls -a' #lists all but "./" and "../" alias la='ls -A' #THIS is the save script alias save='/usr/save.sh' #i make this typo alot so i just fixed it alias cd..='cd ..' #the next few lines are for my bluetooth hacking to #incress my speed of hacking #alias for hciconfig alias hci='hciconfig' #alias hcitool alias hcit='hcitool' #alias for bluebugger alias bug='bluebugger' #makes hci0 up and running alias hciup='hciconfig hci0 up' #makes hci1 up and running alias hci1up='hciconfig hci1 up' #scans for bluetooth devices on default hci device alias scan='hcitool scan' #scans for bluetooth devices on hci1 alias scan1='hcitool -i hci1 scan' #makes a file alias mkfile='touch' #this opens konqueror (i was tired of spelling it) alias kon='konqueror' #this is default for most ls alias ls='ls --color' #save aliases useing another of my costom scripts alias savea='/usr/savealias.sh' #make new aliases work alias updatebash='source .profile' #edit ~/.profile to add/remove aliases alias profile='kwrite ~/.profile' #open wifi assistant alias wifi='wlassistant'
and it would be cool if all you added your aliases for fun
Code:.:pcap:.
There is an error in the HOWTO
The changes.lzm file should be placed in the BT3/modules folder and not the BT3/base folder, at least on the USB install.
What's the difference between this and a changes partition?
Of course, if you really wanted to have some fun, go to Wal-Mart late at night and ask the greeter if they could help you find trashbags, roll of carpet, rope, quicklime, clorox and a shovel. See if they give you any strange looks. --Streaker69
the difference is that, with MY expeaence with the changes partition, it saves every 5 to 10 minutes. and, some people may not always want to save what they were working on, some times i just fiddle and end up with so many scripts on my desktop its full. the whole reason i made this is to save changes before i exit backtrack. with the changes partition it wouldn't always save before i exit.
thats the only way it worked for me i placed them in the BT3/modules folder and they did not load
The next person that creates a poll to ask how good was his post,idea or tutorial is going to get banned. The polls are not real designed for this sort of thing. It is meant for mods and admins to use to poll forum members about how this place could be better and not to feed some kids ego about his tutorial.
Did I just not write a guide on how to do this yesterday???
Edit: I guess you're right in saying the difference is automated saving and prompted saving. Fair play.
Hey its saving files.. Thats all i needed to do. I changed the background but it didnt save that though -shrugs-. I got sick of trying to create a new partition and go through the process only to keep having "operator errors". But this was fast and simple. And ill buy it for a dollar
Thanks PC...
+Dimus+
does this save things such as passwords in firefox?
patience is appreciated =]
hmm.. actually i couldnt figure out how to get the files off my desktop so i got rid of it.. and went back to normal..![]()
+Dimus+