Backtrack clean Hard Drive Install

Every time I try to install BT on a Virtual machine, I mess up the steps. So here is the relevant section from the site below.

Reference: http://www.backtrack-linux.org/tutorials/backtrack-hard-drive-install/

Backtrack clean Hard Drive Install

This method of install is the simplest available. The assumption is that the whole hard drive is going to be used for Backtrack.

Steps:

1. Boot the VM using the ISO

2. In the console type “startx” to get to the KDE GUI

3. Open terminal and type ubiquity

4. Follow the instructions on the subsequent pages and at the end click Install

image

5. Allow the installation process to complete and reboot

6. Login to BT using default credentials, root/toor. Change the root password

7. Fix the frame buffer splash by typing “fix-splash” ( or “fix-splash800” if you wish 600×800 frame buffer), reboot.

Also, in a Linux virtual machine, shared folders appear under /mnt/hgfs, just in case 🙂

Finally: http://www.vmware.com/support/ws55/doc/ws_newguest_tools_linux.html

Advertisements

Python: Print to a log error

Issue:

While writing a script below to a log file:

with open(‘testfile.txt’, ‘wt’) as f:

print(‘Hello to the logs’, file=f)

with open(‘testfile.txt’, ‘rt’) as f:

for line in f:

print(‘This is what we printed to the log file : ‘ + line)

I was repeatedly getting the following error:

D:\Python\Scripts>python printtofile.py

File "printtofile.py", line 6

print(‘Hello to the logs’, file=f)

^

SyntaxError: invalid syntax

Resolution:

Source: http://docs.python.org/2/library/functions.html#print

from __future__ import print_function

with open(‘testfile.txt’, ‘wt’) as f:

print(‘Hello to the logs’, file=f)

with open(‘testfile.txt’, ‘rt’) as f:

for line in f:

print(‘This is what we printed to the log file : ‘ + line)