Get list of git repositories from command line.

Earlier I had posted a small blog on teamgit. The problem still is that you have to manually go to the git.kernel.org page and get the list of the repo\’s that you can download. How about a command line to get the same. Here\’s one:

wget -O – http://git.kernel.org |grep \”class=.list.\” |grep -v title|awk -F\’>\’ \'{print $3}\’|sed \’s/<\\/a//\’

Output will be like this:

linux/kernel/git/ghaskins/linux-2.6-hacks.git
linux/kernel/git/ghaskins/preempt-test.git
linux/kernel/git/ghaskins/schedtop.git
linux/kernel/git/glommer/linux-2.6-x86-pvops.git
linux/kernel/git/gregkh/bti.git
linux/kernel/git/gregkh/ddk.git
linux/kernel/git/gregkh/driver-core-2.6.git
linux/kernel/git/gregkh/lkn.git
linux/kernel/git/gregkh/patches.git
linux/kernel/git/gregkh/tty-2.6.git
linux/kernel/git/gregkh/usb-2.6.git
linux/kernel/git/gregkh/usbutils.git
linux/kernel/git/gregkh/usbview.git
linux/kernel/git/gud/chunkfs-tools.git
linux/kernel/git/gud/chunkfs.git
linux/kernel/git/gud/fuse-chunkfs.git

linux/kernel/git/ghaskins/linux-2.6-hacks.git

linux/kernel/git/ghaskins/preempt-test.git

linux/kernel/git/ghaskins/schedtop.git

linux/kernel/git/glommer/linux-2.6-x86-pvops.git

linux/kernel/git/gregkh/bti.git

linux/kernel/git/gregkh/ddk.git

linux/kernel/git/gregkh/driver-core-2.6.git

linux/kernel/git/gregkh/lkn.git

linux/kernel/git/gregkh/patches.git

linux/kernel/git/gregkh/tty-2.6.git

linux/kernel/git/gregkh/usb-2.6.git

linux/kernel/git/gregkh/usbutils.git

linux/kernel/git/gregkh/usbview.git

linux/kernel/git/gud/chunkfs-tools.git

linux/kernel/git/gud/chunkfs.git

linux/kernel/git/gud/fuse-chunkfs.git

Change user, assume environment, stay in current dir

Bookmark this category

Change user, assume environment, stay in current dir $ su — user I\’ve used this a number of times troubleshooting user permissions. Instead of just \’su – user\’ you can throw another hyphen and stay in the original directory.

* View this command to comment, vote or add to favourites * View all commands by matthewdavis

commandlinefu.com

by David Winterbottom (codeinthehole.com)

URL: http://feedproxy.google.com/~r/Command-line-fu/~3/7LH0tfWi1Oc/change-user-assume-environment-stay-in-current-dir

Database of vulnurability at milw0rm.com – udpate and makeindex with cron.

I am quite regular visitor of milw0rm and generally try to keep up with the vul\’s. For doing this I wrote a small scripts rather set of scripts to keep myself update.  Here\’s what we are going to do:

1. Get the latest tar from the site.

2. Extract it.

3. Make the index

4. Have a shortcut to search the index.

Download the attached files for the first 2 points. makeindex-milw0rm and udpate-milw0rm

Now open the update-milw0rm file with the directory paths, that is located in the starting of the file.

Once that is done, do the following on the terminal,

crontab -e

Add a entry like this:

@daily /home/amit/update-milw0rm.sh

So you are all set to automatically download and update the data everyday. Lets now create a alias to search the exploitlist from the terminal.

Put the following in your profile :

alias search_sploit=\”cat $(cat ~/bin/update-milw0rm.sh|grep dir=|awk -F\’=\’ \'{print $2}\’|awk -F\’\”\’ \'{print $2}\’)/milw0rm/sploitlist.txt|grep -i\”

Now, when you want to search the database for the exploit you can simply type:

search_sploit <search term>