Monday, 14 December 2009
xfce4 verve plugin as standalone application
Tuesday, 8 December 2009
Sunday, 29 November 2009
Farmville auto-clicker
New GUI here
Simple autoclicker script, needs xdotool installed
Download here
For default settings (12x12) use: sh farmville_click.sh
Or custom mode: sh farmville_click.sh num_rows num_columns click_interval_time wait_interval_before_pointing
If give this error(Syntax error: Bad for loop variable), use bash (bash farmville_click.sh)
Download old script here (bash script for *nix based)
Sunday, 6 September 2009
Thursday, 23 July 2009
Latest google chrome build for linux
http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/
Browse to the end of list and download last one.
Using any file manager or command line, extract chrome folder and make an link to /usr/bin or /usr/local/bin.
# unzip chrome-linux.zip
# su
# mkdir -p /opt/google
# mv chrome-linux /opt/google/
# ln -s /opt/google/chrome-linux/chrome /usr/bin/
# exit
# chrome
Starts very fast and has a nice aspect, but they still working on it to release an stable version. keep in touch.
Wednesday, 22 July 2009
More simple bash scripts
#!/bin/bashScript for unzip multiple files. Replacing "zip" extension name and "unzip" command on script, we can change to open other files as well.
if (($(ps -A | grep -c X) > 0));
then
echo starting X....;startx;
fi
#!/bin/bashScript to get links from an list every X time, for example, usefull to automatically open download links like rapidshare, netload, megaupload,...
for file in *zip
do
unzip "$file"
done
Changing time and application, it can be useful to do lots of things =)
#!/bin/bash
waitTime=3600
app="/usr/bin/firefox"
cat $1 | while myLine=`line`
do
echo "Requesting" $myLine
$app $myLine;
sleep $waitTime && echo ""
done
Some usefull commands
Play random mp3
slocate *.mp3 | mpg321 -@ - -z
Play random mp3 from specific folder
slocate *.mp3 | grep /home/user/files/mp3/new/ | mpg321 -@ - -z
Download links from an text file list
wget -i file.txt
Download recursively all page files
wget -r http://url/folder/
Download sequentially files
curl -O http://url/img[01-99].png
Saturday, 11 July 2009
Mount FTP as filesystem
CurlFtpFS is a filesystem for accessing FTP hosts based on FUSE and libcurl.
[Install]
localhost ~ # emerge net-fs/curlftpfs in gentoo
localhost ~ # apt-get install curlftpfs in ubuntu/debian
localhost ~ # ./configure && make && make install by the manual way
[Mount]
localhost ~ # modprobe fuse if you dont have fuse module loaded
localhost ~ # curlftpfs ftp://user:pass@site.com /mnt/mountpoint
[Umount]]
localhost ~ # fusermount -u /mnt/mountpoint
Thats it, now you can access with any file explorer like konqueror, nautilus…..we can do almost everything like edit source code
Adding on fstab
curlftpfs#ftp.host.com /mnt/mountpoint fuse rw,uid=500,user,noauto 0 0
or Making alias
alias mHost=’curlftpfs ftp://user:pass@site.com /mnt/mountpoint’
More int at http://curlftpfs.sourceforge.net/
Mount SSH as filesystem
SSHFS is a filesystem client based on the SSH File Transfer Protocol.
[Install]
localhost ~ # emerge sys-fs/sshfs-fuse in gentoo
localhost ~ # apt-get install sshfs in ubuntu/debian
localhost ~ # ./configure && make && make install manual way
[Mount]
localhost ~ # modprobe fuse if you dont have fuse module loaded
localhost ~ # sshfs user@site.com: /mnt/mountpoint use “-o allow_other” for share between multiple users
[Umount]
localhost ~ # fusermount -u /mnt/mountpoint
Thats it, now you can access with any file explorer like konqueror, nautilus…..we can do almost everything like edit source code, create, delete….
Adding on fstab
sshfs#USERNAME@REMOTE_HOST: REMOTE_PATH MOUNT_POINT fuse SSHFS_OPTIONS 0 0
or Making alias
alias mHost=’modprobe fuse;sshfs user@site.com: /mnt/mountpoint -o allow_other’
More info at http://fuse.sourceforge.net/
Friday, 10 July 2009
Simple CTRL ALT DEL in linux
How to compile kernel script
Download here
cd /usr/src/linux &&
echo "Running kernel configuration..." &&
make menuconfig &&
echo "Compiling kernel..." &&
make &&
echo "Installing kernel modules..." &&
make modules_install &&
echo "Making backup of old kernel..." &&
mv /boot/config /boot/config-old &&
mv /boot/System.map /boot/System.map-old &&
mv /boot/kernel /boot/kernel-old &&
echo "Installing new kernel..." &&
cp /usr/src/linux/System.map /boot &&
cp /usr/src/linux/.config /boot/config &&
cp /usr/src/linux/arch/i386/boot/bzImage /boot/kernel &&
echo done
Usefull bookmarks
translate.google.com --> translate text, web pages and act as proxy =)
pastebin.com --> paste code
imageshack.us --> host images
sendspace.com --> upload files
filewatcher.com --> find files
whatismyip.com --> my ip
ipcalc --> calculate mask, wildcard mask, network address, min host, max host...
default_pass --> default passwords
Tuesday, 5 May 2009
Simple text extraction from images
import -quality 100 /tmp/scan.png && gocr /tmp/scan.png
For example, testing with this example the output was :
Linux, ubuntu, gentoo, scripts, security, networks, digg, sIashdot, engadget, youtube.
Doesnt work 100% but can be usefull :)
Wednesday, 15 April 2009
How to install Nessus on ubuntu
1) download Nessus and NessusClient depending of your distro and your processor arch
2) reproduce the following steps
# sudo dpkg -i Nessus-XXXXX.deb
# sudo dpkg -i NessusClient-XXXXX.deb
3) Get an activation code for update nessus plugins: register in nessus website at plugins section, click on request an activation code, then click on Register a HomeFeed, then go to your email
# /opt/nessus/bin/nessus-fetch --register XXXX-XXXX-XXXX-XXXX-XXXX
4) adding an user, on Authentication (pass/cert) you can press enter ...
# /opt/nessus/sbin/nessus-adduser
5) starting nessus deamon (server)
# sudo /etc/init.d/nessusd start
6) now its time to run nessus client (gui), also you can run from NessusClient shortcut (look for your desktop environment applications menu)
# /opt/nessus/bin/NessusClient
Friday, 10 April 2009
Fingerprint on gentoo with multiple image verification
But i decided to share some minor changes, its an patched version with:
"One more time" when fails finger recognition it ask you to swap the finger one more time, before telling you to write the password when fails.
It has been patched with multiple image verifications, if you have all fingers mapped, on finger scan it will check if the finger scanned is any of yours fingers. This is good because you can swap your finger in device to map it using different position, more or less velocity, .... with this method the probability of fail on verifications decreases :)
# layman -a wschlich-testing
# echo =app-misc/fprint_demo-0.4 >> /etc/portage/package.keywords
# echo =media-libs/libfprint-0.0.6 >> /etc/portage/package.keywords
# echo =sys-auth/pam_fprint-0.2 >> /etc/portage/package.keywords
# cd /usr/portage/local/layman/wschlich-testing/sys-auth/pam_fprint/
# rm Manifest
# wget http://one2one.no.sapo.pt/pam_fprint-0.2.tar.bz2 -P /usr/portage/distfiles/
# ebuild pam_fprint-0.2.ebuild manifest
# ebuild pam_fprint-0.2.ebuild digest
# cd /usr/portage/local/layman/wschlich-testing/media-libs/libfprint/
# rm Manifest
# wget http://one2one.no.sapo.pt/libfprint-0.0.6.tar.bz2 -P /usr/portage/distfiles/
# ebuild libfprint-0.0.6.ebuild manifest
# ebuild libfprint-0.0.6.ebuild digest
# emerge -av fprint_demo pam_fprint
Then start fprint_demo and enroll your finger
then add "auth sufficient pam_fprint.so" on /etc/pam.d/system-auth
after
auth required pam_env.so
and before
auth required pam_unix.so try_first_pass likeauth nullok
Thats it, have fun ... comment if worked
Tuesday, 7 April 2009
Script to take picture at boot and send online
Note: it uses xawtv streamer tool and ftp to send the images to ftp server
If there's no internet connection the script stays on standby waiting for internet connections goes up, then sends. (I have made from some examples, and c# application for windows to do the same, maybe i can post here the application and code)
For example you can add this to startup:
in /etc/conf.d/local.start add sh take_pic_send_online.sh & &>/dev/null
/etc/inid.d/local restart :)
#!/bin/sh
dt=`date +%y%m%d-%T`
filepath="/tmp/"
filename="boot-"$dt".jpeg"
file=$filepath$filename
streamer -c /dev/video0 -b 32 -o $file
hostname="ftp.XXXX.XXX"
username="USERNAME"
password="PASSWORD"
while true
do
if eval "ping -c 1 www.google.com"; then
break;
else
sleep 15;
fi
done
echo -e "***FTP SERVER DOWNLOAD SPEED***\n" >> /tmp/speedtest.log
ftp -inv $hostname >> /tmp/speedtest.log <<>
quote USER $username
quote PASS $password
cd boot
binary
lcd $filepath
put $filename
bye
EOF
rm $file /tmp/speedtest.log
Bash script and perl script to take screenshots online
I made this script to use with key combinations to select when i want to post an screenshot online or not. (Note: you must change the perl script path...)
To post the screenshot online and automatically open with Firefox
sh send.sh 0
To just only save the
sh send.sh 1
#!/bin/bash
filename=`date +%y%m%d%H%M%S`.png
mkdir /tmp/screens;
file=/tmp/screens/$filename
import $file -quality 100;
if [ $1 == 0 ];
then
firefox $( perl freeimagehosting.pl $file ) &
fi