IV Needle Injecting Tech into the Vein

4Feb/100

Using Xming to export windows

Sometimes it's useful to use a GUI on linux for a specific task.  I came across this because of some things Oracle does, but you can use it for other things, too.

1. Download xming from sourceforge

2. Open putty

3. Go to the SSH section>X11>Enable X11 forwarding

4. Open a connection

5. Run a command for something that only runs in a gui, like gedit.

6. The gedit window will appear on your desktop.

Posted by: Alamonot

Filed under: Uncategorized No Comments
3Dec/090

The vim Cheat Sheet

This was written by Nana Långstedt and posted at http://www.tuxfiles.org/linuxhelp/vimcheat.html. I copied it over here because it is easier for me to find it here.

Working with files
Vim command Action
:e filename Open a new file. You can use the Tab key for automatic file name completion, just like at the shell command prompt.
:w filename Save changes to a file. If you don't specify a file name, Vim saves as the file name you were editing. For saving the file under a different name, specify the file name.
:q Quit Vim. If you have unsaved changes, Vim refuses to exit.
:q! Exit Vim without saving changes.
:wq Write the file and exit.
:x Almost the same as :wq, write the file and exit if you've made changes to the file. If you haven't made any changes to the file, Vim exits without writing the file.
These Vim commands and keys work both in command mode and visual mode.
Vim command Action
j or Up Arrow Move the cursor up one line.
k or Down Arrow Down one line.
h or Left Arrow Left one character.
l or Right Arrow Right one character.
e To the end of a word.
E To the end of a whitespace-delimited word.
b To the beginning of a word.
B To the beginning of a whitespace-delimited word.
0 To the beginning of a line.
^ To the first non-whitespace character of a line.
$ To the end of a line.
H To the first line of the screen.
M To the middle line of the screen.
L To the the last line of the screen.
:n Jump to line number n. For example, to jump to line 42, you'd type :42
Inserting and overwriting text
Vim command Action
i Insert before cursor.
I Insert to the start of the current line.
a Append after cursor.
A Append to the end of the current line.
o Open a new line below and insert.
O Open a new line above and insert.
C Change the rest of the current line.
r Overwrite one character. After overwriting the single character, go back to command mode.
R Enter insert mode but replace characters rather than inserting.
The ESC key Exit insert/overwrite mode and go back to command mode.
Deleting text
Vim command Action
x Delete characters under the cursor.
X Delete characters before the cursor.
dd or :d Delete the current line.
Entering visual mode
Vim command Action
v Start highlighting characters. Use the normal movement keys and commands to select text for highlighting.
V Start highlighting lines.
The ESC key Exit visual mode and return to command mode.
Editing blocks of text
Note: the Vim commands marked with (V) work in visual mode, when you've selected some text. The other commands work in the command mode, when you haven't selected any text.
Vim command Action
~ Change the case of characters. This works both in visual and command mode. In visual mode, change the case of highlighted characters. In command mode, change the case of the character uder cursor.
> (V) Shift right (indent).
< (V) Shift left (de-indent).
c (V) Change the highlighted text.
y (V) Yank the highlighted text. In Windows terms, "copy the selected text to clipboard."
d (V) Delete the highlighted text. In Windows terms, "cut the selected text to clipboard."
yy or :y or Y Yank the current line. You don't need to highlight it first.
dd or :d Delete the current line. Again, you don't need to highlight it first.
p Put the text you yanked or deleted. In Windows terms, "paste the contents of the clipboard". Put characters after the cursor. Put lines below the current line.
P Put characters before the cursor. Put lines above the current line.
Undo and redo
Vim command Action
u Undo the last action.
U Undo all the latest changes that were made to the current line.
Ctrl + r Redo.
Vim command Action
/pattern Search the file for pattern.
n Scan for next search match in the same direction.
N Scan for next search match but opposite direction.
Replace
Vim command Action
:rs/foo/bar/a Substitute foo with bar. r determines the range and a determines the arguments.
The range (r) can be
nothing Work on current line only.
number Work on the line whose number you give.
% The whole file.
Arguments (a) can be
g Replace all occurrences in the line. Without this, Vim replaces only the first occurrences in each line.
i Ignore case for the search pattern.
I Don't ignore case.
c Confirm each substitution. You can type y to substitute this match, n to skip this match, a to substitute this and all the remaining matches ("Yes to all"), and q to quit substitution.
Examples
:452s/foo/bar/ Replace the first occurrence of the word foo with bar on line number 452.
:s/foo/bar/g Replace every occurrence of the word foo with bar on current line.
:%s/foo/bar/g Replace every occurrence of the word foo with bar in the whole file.
:%s/foo/bar/gi The same as above, but ignore the case of the pattern you want to substitute. This replaces foo, FOO, Foo, and so on.
:%s/foo/bar/gc Confirm every substitution.
:%s/foo/bar/c For each line on the file, replace the first occurrence of foo with bar and confirm every substitution.

Posted by: Heavymeddler

Tagged as: , , No Comments
13Nov/090

Connecting to an SSH server, really really fast

This post assumes you have the following: an ssh server, putty, and autohotkey-a desktop scripting tool.

  1. Open Putty, and create a session with any and all settings you would want in putty. Add tunnels, compression, etc, whatever you usually do when you start a putty session
  2. Save your session for future use. You'll use the name of this session later.
  3. Write a simple batch script that will load putty, and send a user name and pw.  Mine looks like this: "\putty.exe -load sessionname -l username -pw password
  4. Save your batch file.
  5. This s where we start using autohotkey.  You'll want to download this, and open it to create a new autohotkey script. Here's how my script looks:
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;    Template script (you can customize this template by editing 

"ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey 

releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and 

reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#p::
Run "location of your putty batch file"
WinWaitActive, ahk_class PuTTY,,3
WinMinimize
WinWaitActive, ahk_class ConsoleWindowClass,,3
WinMinimize
return

#c::
If WinExist("ahk_class PuTTY")
{
 WinClose
}
If WinExist("ahk_class #32770")
{
 WinActivate
 Send {Enter}
}

return

Save that script and run it. When ever you press windowkey+p it will start putty.  When ever you press windowkey+c it will close putty!

Posted by: Alamonot

16Oct/090

Install windows from usb flash

Recently came across this little gem, it makes installing windows pretty much any version alot faster and easier.  It allows you to create a bootable flasd drive from a windows cd or other source, it also let you setup  parameters so it doesnt need user input ie. cd key, user names, language, timezones.

WinToFlash - Install Windows from usb - Download page.

Posted by: Webstas

Filed under: Uncategorized No Comments
17Sep/090

Getting my Bluetooth mouse to work with Ubuntu

Microsoft Bluetooth Mouse 5000

Bluetooth Mouse From Hell

I have a Microsoft 5000 Bluetooth Mouse. Unfortunately it has been a total headache to get it to work with Ubuntu and stay working. Below are the steps I have taken to remedy the issue:

  1. Turn on your mouse and make it discoverable
  2. Open a terminal and enter the command: hcitool scan
  3. It should return a list of bluetooth devices in range (mine returned something like: 00:1D:D8:92:FE:45     Microsoft Bluetooth Notebook Mouse 5000)
  4. Enter: sudo gedit /etc/bluetooth/hcid.conf
  5. Add the following entry to the file (remember the name is the same returned in the previous step):
    device HardwareAddressHere {
    name “Microsoft Bluetooth Notebook Mouse 5000”;
    }
  6. Run the command: sudo /etc/init.d/bluetooth restart
  7. Verify that you get a message indicating that stopping and starting bluetooth is OK
  8. Run the command: sudo apt-get install bluez-compat
  9. With your mouse still in discovery mode, run the command: sudo hidd --search
  10. Your mouse should now be paired and working. (this includes after reboot, it should automatically pair)

Posted by: Heavymeddler

17Sep/091

Run Ubuntu on Dell Mini 10 in HD (1366×768)

Dell Mini 10

One Gig Wonder

I found a link on moko's blog that showed how you run Ubuntu Jaunty in 1024x576 on a Dell Mini 10. However, I have the Mini 10 with the HD screen (1366x768) which required a few additional steps to get it work right. Here is the entire process

First, create the file: /etc/apt/sources.list.d/ubuntu-mobile.list

Add the following content and save (these entries will change depending on the version of Ubuntu):

deb http://ppa.launchpad.net/ubuntu-mobile/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-mobile/ppa/ubuntu jaunty main

Open a terminal and run the following two commands:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C6598A30
sudo apt-get update
sudo apt-get install psb-kernel-source psb-kernel-headers

Restart your machine and open the terminal again. Enter the command:

sudo apt-get install xserver-xorg-video-psb

Restart your machine again. You should now have 1366x768 resolution.

Posted by: Heavymeddler

11Sep/090

Getting the Windows XP Royale Noir theme to actually work

I downloaded this windows xp royale noir theme, and tried to get it running on Windows XP SP3, but it only worked while the machine was running, then it was gone. But I figured out how to change that.

1. Download and install the actual Windows Royale theme.

2. Download the Royale Noir theme, and extract it to the C:\Windows\Resources\Themes\royale noir\ folder

3. Go to C:\Windows\Resources\Themes\ and open the Royale.Theme file in a text editor

4. Go to the [Visual Styles] section

5. Change the line "Path=%WinDir%resources\Themes\Royale\Royale.msstyles" to Path=%WinDir%resources\Themes\royale noir\luna.msstyles

6. Save and exit.

After that, you should be able to consistently select the Royale Noir theme from the apperances section.

Posted by: Alamonot

19Aug/090

SSH Secure Shell, an alternate to putty and winscp

I really hate using the scp command, but I also hate having ssh functionality separated when using winscp.  SSH Secure Shell is a good alternative to just using putty.  It includes a sftp gui you can use.  It also has all of the capabilities as putty.

This is the only site I've found on the internet where you can download it.

Posted by: Alamonot

Filed under: Uncategorized No Comments
12Aug/090

Tunneling uTorrent

Setting up Putty

1. Open putty
2. Go to connection>ssh>tunnels
3. Enter a source port, select dynamic, and press add. This is going to be the port you send your uTorrent connection through
4. Do the normal jazz to establish a connection.

Setting up uTorrent

1. Open uTorrent
2. Go to options>preferences>connection
3. Change the following:
Type: Socks5
Proxy: localhost
Port: (The port you entered and tunneled in putty)
Resolve hostnames through proxy (check it)
Use proxy server for peer to peer connections (check it)
4. Press OK

I can't confirm that this encrypts all of the uTorrent traffic, but when I tried it behind a firewall it sure went a lot faster.

Posted by: Alamonot

Tagged as: , No Comments
12Aug/090

Override banned ports in Firefox about:config

Sometimes you need to allow an incoming connection through a specific port that Firefox is blocking. You can override this by following these steps:

  1. Open Firefox
  2. Type this into in the address bar: about:config
  3. Accept the fate of your Firefox warranty
  4. Right-click on the window
  5. Select: New>String
  6. Enter the preference name: network.security.ports.banned.override
  7. The value will be the port you want to open for your browser (you can open it all of the way by entering 1-65535... however, I don't recommend this)
  8. Test it out

Posted by: Heavymeddler

Calendar

March 2010
S M T W T F S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031  

Pages

Recent Posts

Meta

Tags

about config analysis banned ports bluetooth cheat sheet dell dig dns dnsstuff enigma firefox Forensics gmail reader hd high definition interrogation jaunty microsoft 5000 mini mouse netcat nslookup password rainmeter resolution royale noir ssh theme traceroute tunneling ubuntu vi vim volatile whois windows xp

Categories