Pages

Tuesday, April 9, 2013

How to Remotely Access Mac From PC


If you have both Mac and PC and want to control Mac form PC here is the simple and easy way to do that. This guide is written using Mac OS X Snow Leopard and Windows 7 and both computer are on same network. But you can use other Windows version like Vista or XP as well to access Mac remotely.

On Mac OS X:

STEP-1

Click on “Apple” icon and select “System Preferences”
Mac system preferences
Click on “Sharing” icon
Mac Sharing

STEP-2

Click the “Screen Sharing” check box, Note down the IP address as in below screen shot “192.168.0.128″ your IP address may be different. Click on “Computer Settings” button as shown below.
Enable screen sharing on mac
Check the “VNC viewer…” check box,  enter a password for it and click “OK” button (you will enter this password when try to access Mac from PC).
Settings for VNC

STEP-3

On Windows:

Download this TightVNC for Windows on your PC (Download a stable version.)

STEP-4

Install TightVNC, during installation wizard only select “TighVNC Viewer” on “Select Components” screen. Don’t install the TightVNC Server, we don’t need that.
TightVNC setup

STEP-5

Run TightVNC and enter the IP address of Mac computer (noted in step-2) and hit “Connect” button (Explore the “Options” button).
TightVNC connection
Enter password that you setup on Mac in step-2 and hit “OK” button
VNC Authentication
You are done! you have remotely accessed Mac from PC.
Remotely access Mac on PC

How To Forward Ports on Your Router


banner-01
We cover a lot of articles that feature accessing files and features from inside and outside of your network. This usually entails forwarding ports, something that may seem daunting for beginners, but it’s actually pretty simple to do.
There are plenty of projects we’ve covered that use your computer as a server for other devices. When you’re inside of your network, things are great and they work. When you’re trying to access things from outside of your network, things get significantly hairier, so let’s take a look at why that is.

Port Forwarding

From Inside of Your Network
Here’s a map of a simple home network.
As you can see, you’ve got three computers with unique IP addresses all connected to a router. You can easily access the other computers, but when they all access the internet, they go through the router. The router has an IP address that’s relative for you network, but it also has an external IP, one that it uses when interacting with things outside of your network. Whenever these computers make a request towards the internet, they all use the same IP – 127.34.73.214 in our example. Simple requests, such as loading web sites, are automatically handled by the router and are sent to their appropriate places. It’s not too difficult because each computer starts with a unique request, so it’s not hard for the router to figure out where things should go.
Ports and Protocols
Ports help make this process easier. If an IP is like a building’s address, then ports are like the apartment numbers for the residences in the building. Lower numbered ports have specific applications which are standards throughout the computing industry. When you fetch a web page, for example, it uses port 80. The receiving computer’s software knows that port 80 is used for serving http documents, so it listens there and responds accordingly. If you send an http request over a different port – say, 143 – the web server won’t recognize it because it’s not listening there, although something else might be.
Secure shell uses port 22, and VNC is usually done over port 5900. These ports can be changed for different uses, like when you have multiple instances of programs running for different purposes. To avoid interfering with other standard-abiding applications, it’s best to use larger numbers for these alternate configurations. Plex Media Server uses port 32400, for example, and Minecraft servers use 25565 – both numbers that fall into this “fair game” territory.
Each port can be used via either TCP or UDP. TCP, or Transmission Control Protocol, is what’s used most commonly. UDP, or User Datagram Protocol, is less widely used in home applications with one major exception: BitTorrent. Depending on what is listening, it’ll be expecting requests to be made in either one or the other of these protocols.
From Outside Your Network
Now let’s take a look at what happens when a device outside of the network starts a request.
Let’s say you’re out and about and what to access a file on your network. Your computer makes a request to your home network’s IP, 127.34.73.214, which then goes to your router. Your router doesn’t know which computer to send it to.
Thankfully for us, we can configure our router to forward ports. This means that depending on the port number that the request is sent over, the router can pass it along to different IP addresses.
So in this example, when you’re out and about and using your laptop, you use different ports to make your requests. When you access your home network’s IP address using port 22, your router at home knows that this should go to 192.168.1.100 inside the network. Then, the SSH daemon on your Linux installation will respond. At the same time, you can make a request over port 80, which your router will send to the web server at 192.168.1.150. Or, you can try to remotely control your sister’s laptop with VNC, and your router will connect you to it at 192.168.1.200. Pretty clever, right?
You can even tell the router to change ports! For example, let’s say you have two web servers.

When you access your home network via the standard port, 80, you can tell your router to send it to 192.168.1.150. The web server there will be listening at port 80 and will respond accordingly. But, you can tell your router that when you access it via port 10,000, that it should go to another computer, 192.168.1.250, but also at port 80. This way, the second computer doesn’t have to be reconfigured to use a different port, but you can still manage traffic effectively.
EDIT: Corrected the above image (the orange IP address erroneously read 192.168.1.150 originally).

Before Configuring Your Router

There are a few things you need to be aware of when you decide on setting up port forwarding.
  1. If you’re using DHCP, then each device’s IP has the potential to change in the future, and when it does you’ll need to reconfigure your port forwarding settings. For this reason, it’s best to configure your “server” computers with a static IP. Some routers have the ability to “reserve” or “assign” IPs via DHCP that will NOT change in the future, allowing you the best of both worlds, but not all do.
  2. When you access your network externally, you will need to know your router’s external IP address. This can be easily found from someone inside the network by visitingwhatismyip.com. This address can also change. One way to avoid this is to get a domain name redirect, so that when you go to http://myreallyawesomedoman.com, it’ll be your home network regardless of its changing IP.
  3. Using custom ports may trigger your antivirus or firewall, so you may have to add exceptions on your home computers to allow outside access on whatever ports you specify. This is a security risk to some extent, so be careful and take proper precautions!
That being said, if you’re careful and configure things properly, you’ll never have to worry once you’re all set up.

Router Brands

Each manufacturer has different software that they use on their routers. We took screenshots of the port forwarding settings from each of the major brands as well as our near and dear DD-WRT. We’re assuming that you know how to access your router and you know the proper username and password. If you don’t, check out your documentation, your router’s label, or your manufacturer’s website.
Cisco/Linksys
You’ll see port forwarding under Applications and Gaming. Under “Single Port Forwarding,” you can add individual ports to specific IPs. Under “Port Range Forwarding,” you can easily forward whole ranges of ports at a time.
DLink
On DLink’s routers, you’ll find your port forwarding settings in the Advanced section, under the Port Forwarding tab.
Netgear
Netgear’s routers have a side menu. Look under Advanced and click on “Port Forwarding / Port Triggering.” If you use the Smart Wizard, you’ll also get the opportunity to configure port forwarding there.
DD-WRT
DD-WRT and similar third-party router firmwares will usually have port forwarding as a tab under the NAT/Quality of Service section. Remember, clicking “Save” in DD-WRT saves your changes but doesn’t apply them immediately, so be sure to hit “Apply Settings,” too.

Basic Instructions

Regardless of what software is on your router, you’ll be required to enter the same type of information. First, you’ll see a text field where you can type in the name of the application or service. Next, you’ll see which incoming port your router should watch for. Then, you’ll be able to choose which protocol to watch for. A little online research should be able to tell you which one, but if you’re not sure you can choose both. You’ll need to choose which IP address is the destination for this port’s requests. Lastly, you’ll be able to choose which port the request should be targeted to on the destination IP.
Many firmwares will allow you to save many rules but selectively enable them as needed. If yours does it, be sure to check the “Enable” column’s boxes for all the rules you want active.
Now, if you want to check and be sure your router’s port is open and functioning, there are plenty of tools you can use to help you determine this. My favorite, however, is a web-based tool – the You Get Signal Port Forwarding Tester.
All you have to do is enter your port number in the box. Your external IP should be provided already, but if not, just click the “Use Current IP” link, then hit the “Check” button. This will check if your router has the port open and if it’s getting to a place on your network that can handle it.
If everything’s good, you’ll see a green flag icon and a message that says that your port is open. Ultimately, though, you can try to access your forwarded service by using your external IP address. For example, to check to see if your SSH server is properly forwarded, try to connect to it using the IP reported on whatismyip.com and the proper port.

Now that you know how configure your router to forward ports, you may want to revisit some of our articles and try to enable access from outside of your network. If you’ve got any interesting experiences or tips, share them in the comments!

Wednesday, March 6, 2013

Compiling Assembly using TASM in command prompt

Are you learning Assembly language, and confused about how to compile assembly file?
TASM20 is one of assembly compilers that works with Windows XP and Windows 2000 operating system. However, it does not work with Windows 7 64-bit operating system.
If you are using Windows XP or Windows 2000, you can try the following steps to compile and run assembly file.
To download TASM20, the compiler used for assembly file, clickhere.

Assumption: The Tasm.exe & Tlink.exe files used to compile assembly file are located at C:\tasm20\TASM.

1. Open command prompt by pressing Windows + R, or go toStart menu -> Run, then type "cmd" (without quotes).

2. Go to the folder where the Tasm.exe & Tlink.exe files used to compile assembly file are located, i.e. C:\tasm20\TASM.

cd\tasm20\tasm
 
3. For instance, we have made an assembly file named coba.asm used to print character 'A' as following:

4. Commands used:
- To compile the assembly file, use command:
tasm <asm_filename>.asm
e.g.
tasm coba.asm

After executing the command above, an object file (coba.asm) will be created.

- To create .COM file, use command:
tlink /t <obj_filename>.obj
e.g.
tlink /t coba.obj

- To run the result (.COM file), use command:
<com_filename>
e.g.
coba

5. That's all, folks :)

Friday, December 7, 2012

How to add iphone icon to your website


Ever since the original iPhone, the mobile Safari browser has featured a nice little option to add an icon for the displayed website on the home screen. It’s a visual bookmark – when the user touches the icon, it will launch Safari and navigate to the website.
Follow these instructions to add a website bookmark to your home screen – it works on the iPhone, iPad and iPod touch, but the screenshots are taken from the iPhone:

1. In Safari, visit the website you want to store as a bookmark icon then touch the action button.

2. On the popup menu, touch the “Add to Home Screen” option.

3. Change the name to suit you. Don’t choose a name that’s too long because it needs to fit under a standard icon. Touch the Add button when you’re ready.

4. You’ll return to the home screen, which is now showing a new icon.
You’ll notice that the icon displays a miniature screenshot of the website. However, if the website offers an iPhone icon, it will actually show the icon instead.
If you have a website and you would like to offer your iPhone, iPod touch and iPad visitors an icon for their home screens, please continue reading for a tutorial on how to do it.
Note: To continue, you should have (a) a basic understanding of an image editor application so that you can open the image you want to use as an icon and resize it to fit specific dimensions, and (b) knowledge of transferring files to your website’s server.

The easy method

The easiest way to add a single icon that suits both types of iPhone screens (standard resolution and Retina Display) and iPad screens is to create a single PNG image with the dimensions 150 x 150 pixels. The filename for the PNG image must be:
apple-touch-icon.png
You must then upload your new file to the root directory of your website, which is where Safari will look for it when adding the icon to the home screen. e.g. "http://yourdomain/apple-touch-icon.png".
After you have uploaded the new icon image, you can then use the instructions earlier in the post to ensure it works properly when adding the icon to your home screen. Notice that by default iOS automatically resizes the icon, applies shimmer and gloss effects to it and then rounds the edges to match the standard icon shape, size and style.
You’ll also find that some third party apps make good use of the icon if it’s available. For example, this is a screenshot from Reeder for iPad showing the icon for the Cellcode RSS feed:

Using the style that suits your icon

You may have noticed that the icon I have used doesn’t look so great with the standard shimmer and gloss effects applied on the home screen – it interferes with the design of the logo. Luckily, Apple understands that there’s a need for icons without the effects applied and they offer us the ability to show the icon as-is by using the following filename for the PNG image in your website’s root directory instead:
apple-touch-icon-precomposed.png

Getting the icon exactly as you want it and sizing it correctly for different iOS screen resolutions

If you prefer to have the icon fully rendered exactly as you want it to look for each of the three supported iOS screen resolutions, you’ll need to use Adobe Photoshop or an equivalent package to create the icons for the right sizes. You can download a good Photoshop template to help you make your icons match the required shapes and sizes. When you are happy with the way each icon looks, you’ll need to export the icons with the following filenames and place them in the root directory of your website:
iPhone standard icon (57 x 57 pixels) apple-touch-icon-57×57-precomposed.png
iPhone Retina Display icon (114 x 114 pixels) apple-touch-icon-114×114-precomposed.png
iPad icon (72 x 72 pixels) apple-touch-icon-72×72-precomposed.png
You can keep the default icon apple-touch-icon.png that you created earlier in the root directory of your website alongside these new resolution-specific icons. Usually, third party apps will use the default icon and Safari will automatically look for the icon filename that should suit the device best. Safari will only use the default icon or an incorrectly sized icon if it can’t find a file that best matches the screen resolution.
Now the icons look exactly as I want them to:

Having different icons for different pages

So far we have covered specifying icons for a whole website by placing the icon PNG files in the root directory of your website, but Apple also offers the ability to specify icons for individual pages with meta tags. Using this method, you are welcome to name the icon PNG files exactly as you wish because Safari will be looking for the value in the meta tag rather than the image in the root directory. For a single icon that suits all sizes, you should place the following meta tag after the <head> tag and before the </head> tag, where “my_icons/icon_filename.png” is the path location of the icon PNG file that you have created:
<link rel="apple-touch-icon" href="my_icons/my_icon_file_path.png" />
If you have created resolution-specific icons, you should place the following meta tags after the <head> tag and before the </head> tag, replacing the href values with the actual location paths of the icons on your website:
<link rel="apple-touch-icon" href="apple-touch-icon-iphone.png" />
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-ipad.png" />
<link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon-iphone-retina-display.png" />
Now you can control the icon used for the home screen depending on whichever page the user wanted to bookmark. It is recommended that you keep the default icon apple-touch-icon.png in the root directory of your website to ensure there is always an icon available if the meta tags are not present on individual pages.

Tuesday, August 28, 2012

Delete XP & Vista login password

Download and Burn the NTPasswd ISO

First, you will need to download the NTPasswd bootdisk. You can get it from this direct link - cd080802.zip.

Unpack the .zip archive with your favorite tool (or just double-click on it). Inside the archive should be an .ISO (cd image) file.

You will need to record this .ISO image to a blank CD. Double-clicking on the ISO should start up your favorite burning program and ask you for a blank CD. Or if it dosen't work  then you have to install an ISO recorder software such as UltraISO.

Boot from your new CD

Restart your computer with the CD you just burned still in your drive. You will need to boot from this CD.

Depending on the boot sequence set in the BIOS, the computer may automatically boot from the CD or it may be necessary to go into the BIOS Setup and change the order.

However, On most modern computers if you hold down <F12> while the computer is first booting up, you will get a Boot Menu where you can select the CD/DVD-ROM. If this doesn't work, consult your motherboard manual on how to boot from a CD.

Once you have successfully booted from the CD, you will be presented with the following screen:



Press <ENTER> to get started.

Select Windows partition

The next step allows you to choose where the Windows installation that you'd like to modify is located:



Usually, you will have only a single disk marked BOOT, that is the one you usually want to modify.

Enter the number of the boot disk (number 1 in this example), followed by <ENTER>.

Select Windows path and Registry components

Once you've selected the correct windows drive, you will be prompted to enter the location of the windows registry:



Unless you have installed windows to a non-default location, you can simply press <ENTER>.

You will then be prompted which Registry components you would like to load:



Accept the default value (press <ENTER>), and you should find yourself at the Main Menu.



Editing user accounts is exactly what we want to now do, so select option 1, and press<ENTER>

User selection and the User Edit Menu

You will now see a list of the user accounts in the system, and be asked to select which it is you would like to edit:



There are two actual User accounts in our example. The system default Administrator, and a user account VBox.

You should now enter the username you would like to reset the password for (in our example, that will be VBox) and press <ENTER>

You will now be shown some information about the user you have selected, and presented with the User Edit Menu:



Select the safest option for password recovery, 1 (blank the password) and press <ENTER>.

You should now see "Password cleared!", and be returned to the user selection prompt:



Type an exclamation point (!) followed by <ENTER> to return to the Main Menu.

Quit and Save

You should find yourself back at the main menu:



Select the quit option (type q) followed by <ENTER>.

A list of modified files will be displayed, along with a prompt asking if you are sure you want to save:



To write back the changes (and finish resetting the password), type y and press <ENTER>.

After a brief write-back period, the operation will be complete. You can now remove the CD from your CDROM, reboot your computer normally and log in under the newly liberated user account.

Help, I still can't login! Windows says the account is locked.

Put the CD you burned back in, and boot from it again. Repeat the process but at the User Edit menu select option 4 (Unlock and enable user account) instead of 1.
Now Enjoy......... ;)

Saturday, April 7, 2012

Transfer files through FTP Command line

A command line FTP utility is available on Windows and Mac OS X and can be used without installing additional software. Command line FTP is a reliable tool for transferring files. You can also use it for testing when troubleshooting problems with the Dreamweaver or UltraDev FTP client. The instructions provided below show you how to use the command line FTP utility for Windows and Mac OS X.


Note:This TechNote provides basic instructions for using the command line FTP utility. For more detailed information, consult the documentation for your operating system.

Windows:

1 To launch command line FTP utility, go to Start > Run and enter"cmd" into the Open field of the run dialog box. Click OK or press enter.


Note: If using Windows 98/95/Me, enter "command" instead of"cmd".

2 To change to a local directory that contains your site files, type cd followed by the path to the desired directory after the prompt.


Example: If your site files are stored in c:\sites\my_site, enter cd c:\sites\my_site.

3 At the prompt, enter ftp + FTP server name and press enter.






Note: The server name would be the same as the ftp host name used in the define sites dialog box in Dreamweaver and UltraDev.


Example: ftp ftp.redhat.com.

4
You are prompted to enter a user name. Following the prompt, enter the user name for the FTP account and press enter.


Note: If you are connecting to an FTP server that allows anonymous FTP, you don't need a valid account. However, use the preconfigured account called ftp (ftp is the same as anonymous) to access the server.

5 Enter your password when the password prompt appears and press enter.






Note:For security reasons, the password entered is not displayed on the screen.

6 When the' Login successful' message appears, you have successfully connected. You now know that the ftp server is up and running and that you can successfully connect to it from your machine.


At the ftp> prompt, you can run any FTP commands. To get a listing of acceptable FTP commands, simply enter a question mark (?) and press enter.


Note: You still see a list of FTP commands even if you are not successfully connected to the FTP server.


Commonly used FTP commands:


ls: directory listing equivalent to dir.
ls -l: long directory listing, more detail.
pwd: display the name of current directory.
cd: change directory.
lcd: change the local current directory.
get: to download the file from the FTP server.
put: to transfer file and place it on the FTP server.
mget: to download multiple files from the FTP server.
mput: to transfer multiple files to the FTP server.
prompt: to turn on/off interactive mode.
binary: to turn on binary mode.
ascii: to turn on ascii mode.
delete: to turn a file on FTP server.
status: to display how the current FTP session is configured.
mkdir: to make directory on FTP server.
quit/close/bye/disconnect: to disconnect from the FTP server


Note: All FTP commands are case sensitive and in lower case.


Mac OS X

1 To launch terminal, choose Hard Drive > Applications > Utilities > Terminal.
2 At the UNIX shell prompt, you can change the current directory by typing cd + the path to the desired directory.
3 At the UNIX shell prompt, enter ftp + the FTP host name and press return.
4 Follow Windows steps 4 - 6.