CIA Threats to Pakistan Episode 6

Part-1

Par-2

Par-3


ISPR Documentary – Tenacious Ten – Pakistan Army

Part-1

Part-2


Following commands can give network connections information,

  1. # netstat -tulpan
  2. # lsof –i

Command#1 (netstat –tulpan) will give you connections information, but I did not find any way to kill connection after get information from it.

Command#2 (lsof –i) will give you useful connections information and PID of connections as well. You can kill that session using PID.


Given code is working perfect to generate new copy of NDIS_PACKET,

NDIS_STATUS
CreateNewSendNdisPacket(IN NDIS_HANDLE SendPacketPoolHandle,
                        IN PNDIS_PACKET pkt_old,
                        IN PGUINT8 pkt_raw,
                        IN GUINT32 pkt_len,
                        OUT PNDIS_PACKET * pkt_new)
{
  NDIS_STATUS Status;
  NdisDprAllocatePacket(&Status, pkt_new, SendPacketPoolHandle);
  if(Status == NDIS_STATUS_SUCCESS)
  {
    PNDIS_BUFFER  MyBuffer;
    PSEND_RSVD    SendRsvd;

    SendRsvd = (PSEND_RSVD)((*pkt_new)->ProtocolReserved);
    SendRsvd->OriginalPkt = pkt_old;
    NdisAllocateBuffer(&Status, &MyBuffer, SendPacketPoolHandle, pkt_raw, pkt_len);
    if(Status == NDIS_STATUS_SUCCESS)
    {
      NdisChainBufferAtFront((*pkt_new), MyBuffer);
      (*pkt_new)->Private.Flags = NdisGetPacketFlags(pkt_old);
    }
  }
  return Status;
}

NDIS_STATUS
CreateNewRecvNdisPacket(IN NDIS_HANDLE RecvPacketPoolHandle,
                        IN PNDIS_PACKET pkt_old,
                        IN PGUINT8 pkt_raw,
                        IN GUINT32 pkt_len,
                        OUT PNDIS_PACKET * pkt_new)
{
  NDIS_STATUS Status;

  NdisDprAllocatePacket(&Status, pkt_new, RecvPacketPoolHandle);
  if(Status == NDIS_STATUS_SUCCESS)
  {
    PNDIS_BUFFER MyBuffer;
    PRECV_RSVD   RecvRsvd;

    RecvRsvd = (PSEND_RSVD)((*pkt_new)->MiniportReserved);
    RecvRsvd->OriginalPkt = pkt_old;

    NdisAllocateBuffer(&Status, &MyBuffer, RecvPacketPoolHandle, pkt_raw, pkt_len);
    if(Status == NDIS_STATUS_SUCCESS)
    {
      NdisChainBufferAtFront((*pkt_new), MyBuffer);
      (*pkt_new)->Private.Flags = NdisGetPacketFlags(pkt_old);
    }
  }
  return Status;
}

Don’t forget to delete memory after send complete. I have used above functions in PassThru example of NDIS-WDK.


Given code can help you to compute checksum.

/* pseudo header for checksum calculation */
typedef struct pseudoh {
    guint32 src_addr;
    guint32 dest_addr;
    guint8  zero;
    guint8  protocol;
    guint16 length;
} PSEUDO_HDR, * PPSEUDO_HDR;

/* Compute Checksum for TCP packets */
GUINT16 ComputeChecksum(PGUINT16 pseudo_hdr, PGUINT16 ptcp_hdr, PGUINT16 pdata, GUINT32 dataSize) {

  guint32 checksum = 0;
  guint32 nleft = 0;

  nleft = SIZE_PSEUDO_HDR;
  while(nleft > 1) {
    /*  This is the inner loop */
    checksum = checksum + *(pseudo_hdr++);
    nleft = nleft – sizeof(guint16);
  }

  nleft = SIZE_TCP_HEADER;
  while(nleft > 1) {
    /*  This is the inner loop */
    checksum = checksum + *(ptcp_hdr++);
    nleft = nleft – sizeof(guint16);
  }

  nleft = dataSize;
  while(nleft > 1) {
    /*  This is the inner loop */
    checksum = checksum + *(pdata++);
    nleft = nleft – sizeof(guint16);
  }
  if(nleft)
    checksum = checksum + *((pguint8)pdata);
  /*  Fold 32-bit sum to 16 bits */
  checksum = (0xFFFF&(checksum >> 16)) + (checksum & 0xffff);
  checksum = (checksum & 0xffff) + (0xFFFF&(checksum >> 16));
  return (guint16)(~checksum);
}


Pakistan Win! الله اکبر

Icc-world-twenty20-2009 by you.



This setting will enables for you to control automatic rebooting of the system after the crash. After the crash, you must be able to check the reason of the crash and for that, the system should not reboot. Therefore, it is very necessary to control the automatic rebooting of the system.

Path:  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl\]
Location: Local Machine
Value Name: AutoReboot
Data Type: DWORD (DWORD Value)
Enabled Value: 0
Disabled Value: 1
Action Type: Modified


While working on Microsoft Device Driver domain, I found following most active and helpful forums,

1) OSR-Online: http://www.osronline.com
You can configure OSR-Online forum on email client and given client will be helpful for you.
http://www.osronline.com/page.cfm?name=NewsReaderInfo

2) Microsoft NNTP Server: msnews.microsoft.com
Following groups are available on Microsoft forum,
1. microsoft.public.development.device.drivers
2. microsoft.public.windowsxp.device_driver.dev
You can configure Microsoft NNTP server on email-client using above “OSR-Online Forum Configuration” process but you will use “msnews.microsoft.com” for Microsoft NNTP Server address. You will not need authentication cardinality to connect Microsoft NNTP Server.

NOTE: Some time few consultants will discourage you to use forums for help and will ask you to get consultancy from them. Please do not underestimate yourself and try google and other forums for help because “Everything possible but nothing is impossible”.


I faced given compilation error after convert “Komodia Project” from “VC6” to “VS2K5”.

Error    1    Command line error D8004 : ‘/D’ requires an argument    cl

Solution:

Remove “/D” from “Additional options” (Example image is given below).
Path of “Additional options” is “Project Properties” >> “Configuration Properties” >> “C/C++” >> “Command Line”

Komodia_Project_Error by you.


Special thanks to Hollis Technology Solution to write script for build DDK source with vs2k5.
[link] http://www.hollistech.com/Resources/ddkbuild/ddkbuild3_14.zip

Following Environment variables need to use DDKBuild v3.14 script with vs2k5. I am using WDK 6001.18002. Don’t open vs2k5 before do following configuration.

  1. Name: WINDDK
    Value: C:\WinDDK\
  2. Name: WLHBASE
    Value: C:\WinDDK\6001.18002\
  3. Edit “Path” variable and add “%WINDDK%;” string at the end of “Path” variable.
  4. Copy “ddkbuild.bat” file on “C:\WinDDK\” location.

Open vs2k5 environment using “devenv” command. Create “Makefile based project” and set configuration according to image.

ddkbuild_3.14_configuration_stime by you.

You can set build commands after create project. All you need to set build command according to given image.

ddkbuild_3.14_configuration by you.

Build Command Line: ddkbuild –WLHXP checked .
Rebuild Command Line: ddkbuild –WLHXP checked . –ceZ

I have configured WinDDK with DDKBuild_3.14 for WindowsXP. Please change configurations parameters according to your Microsoft Operating System.


Following POSIX Regular Expression will be needed commonly while developing application,

ALPHA_REG_EXPRESSION = "[a-zA-Z ]*"

ALPHA_UNDERSCORE_REG_EXPRESSION = "[a-zA-Z_ ]*"

ALPHA_NUMERIC_REG_EXPRESSION = "[a-zA-Z0-9 ]*"

ALPHA_NUMERIC_UNDERSCORE_REG_EXPRESSION = "[a-zA-Z0-9_ ]*"

ALPHA_NUMERIC_UNDERSCORE_DASH_REG_EXPRESSION = "[a-zA-Z0-9_[-] ]*"

DECIMAL_REG_EXPRESSION = "[0-9]*[.][0-9]*"

INTEGER_REG_EXPRESSION = "([1-9][0-9]*)|0"

ADDRESS_REG_EXPRESSION = "[,.#_a-zA-Z0-9- ]*"

IP_REG_EXPRESSION = "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"

EMAIL_REG_EXPRESSION = "[a-zA-Z0-9._]*@[a-zA-Z0-9 ]*.[a-zA-Z]*"

EMAIL_REG_EXPRESSION = "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}\\b"

MAC_REG_EXPREESION = "([0-9a-fA-F][0-9a-fA-F]-){5}([0-9a-fA-F][0-9a-fA-F])"

MAC_REG_EXPREESION = "[0-9A-Fa-f[-] ]*"

ZIPCODE_REG_EXPRESSION = "([0-9a-zA-Z]{5})|([0-9a-zA-Z]{7})|([0-9a-zA-Z]{9})|([0-9a-zA-Z]{11})"

NUMERIC_DASH_REG_EXPRESSION = "[0-9- ]*"


I always face one problem on fresh Eclipse Ganymede installation, How I can install subversion on it?

You can install Subversion on Eclipse Ganymede, in two step,

1. Install SVN Team Provider from

http://download.eclipse.org/technology/subversive/0.7/update-site/

2. After installing SVN Team Provider and restart Eclipse then install SVN
connectors from

http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/


# synergyc –f –d ERROR –daemon <server_ip_address>

I recommend to add this command on “/etc/rc.local” file for automatic start synergy client at login time.

[Synergy]


For uninstall/repair Windows Live Messenger 2009, you have to use "Windows Live Essentials" from “Add/Remove Programs”. Image will help you a lot.

Windows Live Messenger by you.


This is my first blog testing with "Windows Live Writer". Download information is given blow,
[Download link]

It has cool interface and good option for Blog Writing…


unsigned short ComputeChecksum(unsigned short *data, int size)
{
    register int nleft=size;
    unsigned long checksum = 0;
    while(nleft>1)
    {
        checksum=checksum+*data++;
        nleft=nleft-sizeof(unsigned short);
    }
    if(nleft)
        checksum=checksum+*(unsigned char*)data;
    checksum=(checksum>>16)+(checksum&0xffff);
    checksum=checksum+(checksum>>16);
    return (unsigned short)(~checksum);
}


You can use given command on prompt.
# tar -zxvf <name>.tar.gz


Command:

# find -name .svn -exec rm -rf {} \;

OR

# find -name “\.svn” -exec rm -rf {} \;


QUAID-E-AZAM by you.

“Do your duty and have faith in God. There is no power on earth that can undo Pakistan. It has come to stay InshAllah.”
(Quid-e-Azam)


package com.Web;

import java.io.*;
import java.net.*;

public class WebServer extends Thread {
    String filePath;
    OutputStream out;
    Socket sock;
    public WebServer(String pathString, OutputStream outStream, Socket s) {
        filePath = pathString;
        sock = s;
        out = outStream;
    }
    public void run() {
        PrintWriter writer = new PrintWriter(out, true);
        try {
            filePath = (new File(filePath)).getAbsolutePath();
            InputStream in = new FileInputStream(filePath);
            int val;
            writer.println(”HTTP/1.0 200 OK”);
            writer.println(”");
            System.out.println(”<Client> Uploading : ” + filePath);
            while ((val = in.read()) != -1) {
                out.write(val);
            }
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            writer.println(”<html><body><b>” + e.getMessage()
                    + “</b></body></html>”);
            System.out.println(”<Client> ” + e.getMessage());
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            writer.println(”<html><body><b>” + e.getMessage()
                    + “</b></body></html>”);
            System.out.println(”<Client> ” + e.getMessage());
        }
        writer.println(”");
        System.out.println(”<Client> Uploading : Complete”);
        System.out.println(”<Client> “);
        try {
            sock.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            System.out.println(”ERROR: ” + e.getMessage());
        }
    }

    public static void main(String[] args) throws Exception {
        ServerSocket server = new ServerSocket(80);
        while (true) {
            Socket s = server.accept();
            OutputStream out = s.getOutputStream();
            InputStream in = s.getInputStream();
            InputStreamReader inReader = new InputStreamReader(in);
            BufferedReader reader = new BufferedReader(inReader);
            String line = reader.readLine();
            while (line != null && !”".equals(line)) {
                System.out.println(”<Client> ” + line);
                String splitString[] = line.split(” “);
                if (splitString[0].equals(”GET”)) {
                    WebServer webServer = new WebServer(”.” + splitString[1],
                            out, s);
                    webServer.start();
                }
                line = reader.readLine();
            }
            System.out.println(”<Client> “);
        }
    }
}

It is your duty to compile and make it working condition… use JDK1.6 and eclipse…


Gmail has good feature to tell your last active session.

gmail-login-detail by you.


Most of time, we use different applications without knowing application details. One of application has installed Bonjour service on my system, do know when.

Follow these simple steps:

  1. Open a Windows Run prompt window (Start – Run), type given command and press enter.
    “C:\Program Files\Bonjour\mDNSResponder.exe” -remove
  2. Navigate to the following folder in Windows Explorer.
    “C:\Program Files\Bonjour”
  3. Rename the mdnsNSP.dll file in that folder to mdnsNSP.old
  4. Restart your computer
  5. Delete the the “Program Files\Bonjour” folder

In the mean while I found some other parameters for “mDNSResponder.exe”. Check image!

mDNSResponder_Remove by you.


Given command will help to install Gnome-UI based Wireshark on linux,

# yum install ethereal-gnome


Today we will try to know, who was Sultan Salahuddin Ayubi?

Watch below videos to know about Sultan Salahuddin Ayubi,

16 – Sultan Salahuddin Ayubi WATCH ONLINE DOWNLOAD
17 – Sultan Salahuddin Ayubi WATCH ONLINE DOWNLOAD

After watch above videos, I like to recommend one Hollywood movie “Kingdom of Heaven”. A good torrent link on “Kingdom of Heaven” has given below.

torrent

Don’t forget to watch.

“Do your duty and have faith in God. There is no power on earth that can undo Pakistan. It has come to stay InshAllah.”
Quid-e-Azam