Install Visual Code Grepper on Ubuntu 14.04×64

VisualCodeGrepper needs the .net 4 Framework  installed. The following steps are necessary to get VisualCodeGrepper working with wine on ubuntu 14.04.

 

Java – Call a shell script and wait until it’s end

 

Send Strg + C on Eclipse in Linux

I wasn’t able to send strg + c in the console. So I found the following command which must be executed from a shell.

 

HowTo – Installation of 3proxy 0.8.6, a tiny free proxy server on Debian 8

In this tutorial I’m going install and configure 3proxy on Debian 7×86. It is a really fast and lightweight alternative to Squid Proxy. My whole system with running 3proxy needs only 15 MB RAM. I will configure a HTTP Proxy and chroot him to increase security. Users for the Proxy are stored in the /usr/local/etc/3proxy/passwd file. At the end of the article I will add an user.

# Install Dependencies

# Download, compile and move 3proxy to wanted directory
# 3proxy will be chrooted to the directory /usr/local/etc/3proxy for security reasons

# Setting the file permissions.
# Only the log folder and the pid file should be rightable by 65535

# Save the following config in /usr/local/etc/3proxy/3proxy.cfg

# Generate an init script for automatic startup 3proxy after reboot

Content of the file /etc/init.d/3proxyinit

# Make the file executable

# Manual stop and start 3proxy

# Tell iptables, the internal firewall to forward packets arriving at Port 443 to 3128 (Port 3proxy ist listening)

# Install programm to make iptable Rules persistent (even after reboot)

######Add a user to the /usr/local/etc/3proxy/passwd file

 

Selenium – Firefox Webseite komplett speichern (Bilder, css, html)

I found a solution to the problem by myself. The Problem is when you click on Save page as -> STRG + S an OS-Window pops up, which can’t be managed by Selenium. I read about many possible solutions about that using tools like AutoIT, xnee, jna or Java Robot.

I didn’t wanted to use such tools. So I searched for a firefox addon which is able to download a whole page (including images, css, html). After some seconds I found Scrapbook.

At last I downloaded the Addon File scrapbook-1.5.11-fx.xpi, modified some values in it and used it with selenium. It is working very vell.

Values I changed at /defaults/preferences/scrapbook-prefs.js which is

This config tells scrapbook to save the webpages at the defined path and that the shortcut for saving a page is STRG + SHIFT + D.

Now you only have to add the Plugin to the firefox profile,call a website and Send the shortcut to the browser.

I hope this helps someone!

Cisco Offline Password 7 Decryption

Create a .html file with the following content:

 

Install Laravel 4.2 on Ubuntu Server 14.04 LTS

I was having a little trouble getting Laravel installed on a newly installed Ubuntu 14.04 LTS server. I’ve decided to document the whole process in hopes that I’ll use the documentation to good use once again sometime in the future. Who knows, someone will benefit from reading this. I’m not the only one that will be doing a Laravel installation on Ubuntu.

If you need to install Ubuntu from scratch, I recommend that use install LAMP and SSH because you’ll need those services to support Laravel. PHP, MySQL, Apache and SSH would be installed for you right out of the gate. In addition, I recommend that you install PHPMyAdmin for database administration.

In Ubuntu, the default document root is /var/www/. Before starting, let’s make sure we got the correct permissions for Apache, and for the user (you). This is to prevent so you don’t run into issues with write permissions on the document root.

Permissions for /var/www/

Let’s get the prerequisites taken care of before installing Laravel

Install Curl

Install Mycrypt


Activate Mcrypt

Enable Mod-Rewrite

Install Laravel via Composer

Install Composer First

Installer Composer Globally

Install Laravel

Set up your Apache virtual host

The cool thing about this example is, by setting up your /var/www permissions, you don’t need to change permissions to “app/storage” since you already have the correct permission to /var/www.

Finally, access Laravel from the IP address of your Ubuntu Server. The IP address of your Ubuntu server should be a static IP address. You can set this in the network config file called /etc/networking/interfaces.

Have fun!

Synology Festplatten upgrade – alte Platte einlesen

Die zwei neuen Platten einbauen. Mit dem Synology Installation Assistant die NAS einrichten. Anschließend kann man eine alte Platte per USB an die NAS anschließen.

In der Weboberfläche muss noch SSH aktiviert werden.

Anschließend ssh root@NAS_IP

Assumptions

  • You know how to login as Admin on the NAS to which you are going to connect the USB disk
  • The USB Disk you are adding is already preformatted with either ext2 or ext3 (Synology products format internal drives as ext3). If the drive is not formatted or formatted as NTFS the procedure should be similar but you may need to vary some of the commands.
  • The Synology NAS to which you are connecting the USB Disk is working normally.

Procedure

  1. Ensure the NAS is powered up and running normally
  2. Connect the USB enclosure containing the Hard Disk to the NAS
  3. Enable the Command Line Interface (Telnet or SSH)
  4. Login into the Command Line Interface as „root“
  5. Check what you already have mounted in the system by entering the command „df“.
  6. Now we check that the new drive is being recognised, enter the command „fdisk -l“ thats a lower case L not a 1. You will see each installed disk (installed internally and via USB) listed and each partition on the disk listed. For instance your internal hard disks on a multi-bay NAS will be listed as „Disk /dev/sda“ for internal disk 1 and „Disk /dev/sdb“ for internal disk 2 etc. At the bottom of the list will be any externally mounted disks (e.g. via USB). On my system the UsB disk was listed as „/dev/sdk“. As the disk was from another Synology NAS it had the three synology created partitions on it: sdk1, sdk2 and sdk3. But most disks will probably only have one partition „/dev/sdk1“.
  7. Now we need to map the required partition of the USB disk to a directory on the NAS root („/“). For windows users, the Linux „mount“ command makes data on the mounted partition appear in a directory in the operating system root directory, Linux doesn’t use drive letters, disk are mounted as a directory instead. Before we can mount the drive we have to create the directory the mounted drive will be attached to. For temporary mounts we can create a directory under the „/mnt“ directory. Hence create the directory „/mnt/usb“ by entering the command „cd /mnt“ and „mkdir usb“.
  8. Now we mount the required partition on the USB disk (for most people it will be „/dev/sdk1“) to the directory „/mnt/usb“. Enter the command „mount -t ext3 /dev/sdk3 /mnt/usb“ (if your disk is ext2 formatted then use ext2 instead of ext3). If your USB disk is from a working RAID1 configuration see the section „How to mount a USB enclosure containing a RAID1 disk“ below.
  9. Finished, you can now use the cp or other commands to copy/move data
  10. You only created a temporary mount so if you reboot the NAS you will need to re-use the same mount command again.
  11. If you want to mount the Disk permanently you need to modify the „/etc/fstab“ file using vi using the command „vi /etc/fstab“. For the example above, i.e. we want to mount the usb disk you will need to add an entry like „/dev/sdk /mnt/usb ext3 defaults 0 0“. If you need help using vi see Basic commands for Linux VI Editor. Note in the fstab file we are describing the format and way we want the OS to handle the disk, so you don’t specify the partition numbers. After modifying the fstab file. You use different options in the mount command, i.e. without the „-t“ and „ext3“ options. Hence enter something like „mount /dev/sdk1 /mnt/usb“ making sure you use the exact correct nomenclature for your circumstances as described previously.

How to mount a USB enclosure containing a RAID1 disk

If the disk in the USB enclosure was from a working RAID1 configuration you will need to use the mdadm command to attach the USB drive to an available md array before your can mount the md array.

  1. Follow the procedure above up to the point where it says to come to this section
  2. Check md identifiers of the partition you want on the USB disk are intact, e.g. enter the command „mdadm –examine –scan /dev/sdk3“. mdadm should report back a single line, something like „ARRAY /dev/md2 level=raid1 num-devices=2 UUID=db7c8f07:6f0f4570:852c2e22:a378fec9“. Don’t worry about the „/dev/md2“ this is just where it was last used. If you get an error message and are certain the disk was from a RAID1 array you won’t be able to use this procedure untill you repair the partitions md identifiers. You will have to search elsewhere for how to repair identifiers.
  3. Check what md arrays are already defined using the command „mdadm –detail –scan“. Alternatively for a bit more info use „cat /proc/mdstat“. All multi-bay synology servers will have md0 (the OS), md1 (the swap file space), md2 (/volume1). If you have other volumes you may also have md3 (/volume2) etc.
  4. We will use the next available md array number, e.g. if the last one on the list produced in the previous step was md2 then we will attach your usb disk to „md3“. Use the command „mdadm -A –verbose –run /dev/md3 /dev/sdk3“. The –run option forces the making of the attaching of the array when only 1 of the original 2 RAID1 disks are available.
  5. You can now mount the „md3“ array to „/mnt/usb“ using the command „mount /dev/md3 /mnt/usb“.

Try with a command like „lvm vgscan“ if it can detect the volumes contained there.
If that succeeds, you’ll need to activate it „lvm vgchange -a y <volumegroupname>“
then „vgdisplay“ will tell you about logical volumes names, and finally you
should be able to run something like „mount /dev/<volumegroupname>/<logicalvolumename> /t“