Showing posts from November, 2015

PHP script for WHOIS Lookup on domain name or IP

This is a PHP script for performing WHOIS lookups on domain name or IP address . This PHP script is intended to lookup for domain registrant data for all top-level domains (both generic and country-code types are supported, 158 TLDs in total), and also for IP whois lookups. <?phpheader('Content-Type: application/json');/*************************************************************************Browse: whoise.php?*************************************************************************/$domain = $_GET['domain'];// For the full list of TLDs/Whois servers see and$whoisservers = array( "ac" => "", // Ascension Island // ad - Andorra - no whois server assigned "ae" => "", // United Arab Emirates "aero"=>"", "af" => "", // Afghanistan "ag&qu

How Can Many Users Share the Same Port ( TCP / HTTP Listening )

So, what happens when a server listen for incoming connections on a TCP port? For example, let’s say you have a web-server on port 80. Let’s assume that your computer has the public IP address of and the person that tries to connect to you has IP address This person can connect to you by opening a TCP socket to Simple enough. Intuitively (and wrongly), most people assume that it looks something like this: Local Computer  |  Remote Computer ——————————– <local_ip>:80     |  <foreign_ip>:80 🙁  not actually what happens, but this is the conceptual model a lot of people have in mind. This is intuitive, because from the standpoint of the client, he has an IP address, and connects to a server at IP:PORT. Since the client connects to port 80, then his port must be 80 too? This is a sensible thing to think, but actually not what happens. If that were to be correct, we could only serve one user per foreign IP address. Once a remote computer

8086 - Program to draw on screen using mouse (Free Hand Drawing)

 ;Free hand drawing using mousecode segmentstart: mov ax, data mov ds, ax   mov al, 13hmov ah, 0   ; set graphics video 10h   mov ax, 0    ;initialize mouseint 33h                   mov ax, 1  ;shows mouse cursor         int 33h     start1:               mov ax, 3  ;get cursor positon in cx,dx        int 33h           call putpix ;call procedure         jmp start1       ;defining procedure to print    putpix proc    mov al, 1100b        mov ah, 0ch        shr cx,1           ; cx will get double so we divide it by twoint 10h     ; set pixel.ret     putpix endp     end:     mov ah,4ch     int 21hcode ends end start