Top
JohnKlann / Posts tagged "commands"

How to Start a Process as Administrator

So I find this one to be rather useful. I probably use it nearly every day. The syntax is simple the results are powerful. How to start a process as administrator in powershell.

  1. Open Powershell Console (doesn’t need to be admin) or the windows run prompt (win+R):
  2. Use the following Command Syntax to launch a process as admin:
    1. Start-Process ProcessName -Verb runas
  3. Example:
    1. Start-Process Powershell -Verb runas

 

powershell_start_process_as_administrator

jklann

How to Stream a Webcam through SSH with VLC on Backtrack 5 R3 Gnome 32

 

You will want to perform Steps 1 and 2 on both the server and the client.
Step 1: Install VLC and Fix it for Backtrack 5 

apt-get install vlc

hexedit /usr/bin/vlc

Press tab

replace geteuid._libc_start_main with getppid._libc_start_main

ctrl+x

y

vlc “and it should now work”


Step 2: Setting up ssh “if you have never used it”

nano /etc/ssh/sshd_config

Add the following Lines or un-comment them if they are already there.

PermitRootLogin yes
UsePrivilegeSeparation yes


X11Forwarding yes
X11DisplayOffset 10
TCPKeepAlive yes


UsePAM yes

If you have not used ssh before you will need to generate keys run commands below:

ssh-keygen
Enter file in which to save the key (/root/.ssh/id_rsa):
/etc/ssh/ssh_host_rsa_key
password:
re-enter:

ssh-keygen
Enter file in which to save the key (/root/.ssh/id_rsa):
/etc/ssh/ssh_host_dsa_key
password:
re-enter:

Step 3: Now you will need to start ssh by running the command below:

start ssh

Step 4: Now that everything is setup lets start the webcam stream:

ssh -C -X root@serverip -L 9091:localhost:9091
password:
“backtrack’s default is: toor”

Note: If you get an error about the SSH keys not matching.

gedit /root/.ssh/known_hosts

Then delete everything and save the file.

Then run the command below:

vlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-adev=/dev/dsp :v4l2-standard=0 :sout="#transcode{vcodec=mp4v,vb=800,scale=1,acodec=mpga,ab=128, channels=2}:duplicate{dst=std{access=http,mux=ts,dst=localhost:9091}}"

Now open a new terminal and run this command:

vlc http://localhost:9091

 


jklann