CIA Threats to Pakistan
CIA Threats to Pakistan Episode 6
Part-1
Par-2
Par-3
Filed under: News, Uncategorized | Leave a Comment
Tags: USA India Raw CIA Terrorist Nuke
ISPR Documentary – Tenacious Ten – Pakistan Army
Part-1
Part-2
Filed under: News, Uncategorized | Leave a Comment
Tags: Pakistan Army
Following commands can give network connections information,
- # netstat -tulpan
- # 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.
Filed under: Linux, Network, fun & enjoy | Leave a Comment
Tags: network connection netstat lsof command linux
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.
Filed under: C/C++, DDK, Network, WDF, WDK, Windows | Leave a Comment
Tags: NDIS_PACKET WDK DDK NDIS
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);
}
Filed under: C/C++, Java, Linux, Network, WDF, WDK | Leave a Comment
Tags: Checksum TCP
Pakistan Win! الله اکبر

Filed under: Blogroll, News, fun & enjoy | Leave a Comment
Tags: Pakistan Win ICC Twenty20 World Cup 2009
India, Israel and U.S.A are supporting terrorist groups in Pakistan. Reference links will proof this.
Baitullah Mehsud exposed and denounced by Afghan Taliban!
http://pakistankakhudahafiz.wordpress.com/2009/06/18/baitullah-mehsud-exposed/
Indians Fighting In Swat
http://pakistankakhudahafiz.wordpress.com/2009/05/21/indians-fighting-in-swat/
Confirmed: TTP Using Indian/US Weapons
http://pakistankakhudahafiz.wordpress.com/2009/05/31/confirmed-ttp-using-indianus-weapons/
US Aware India Supporting Pakistani Taliban
http://pakistankakhudahafiz.wordpress.com/2009/02/19/us-aware-india-supporting-pakistani-taliban/
US, Israel and India backing Baitullah Mehsud: reveals close aide
http://pakistankakhudahafiz.wordpress.com/2009/06/18/israel-india-backing-mehsud-ex-ttp-commander/
Is U.S.A fighting against terrorist?
Filed under: Blogroll, News, Uncategorized | Leave a Comment
Tags: India Israel U.S.A US Pakistan Terrorist Swat Fata Taliban
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
Filed under: C/C++, DDK, Network, WDF, WDK, Windows, fun & enjoy | Leave a Comment
Tags: reboot WDK DDK system crash
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”.
Filed under: C/C++, DDK, Network, News, WDF, WDK, Windows | Leave a Comment
Tags: NNTP
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”

Filed under: C/C++, Network, Windows | Leave a Comment
Tags: Network LSP Komodia Winsock2
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.
- Name: WINDDK
Value: C:\WinDDK\ - Name: WLHBASE
Value: C:\WinDDK\6001.18002\ - Edit “Path” variable and add “%WINDDK%;” string at the end of “Path” variable.
- Copy “ddkbuild.bat” file on “C:\WinDDK\” location.
Open vs2k5 environment using “devenv” command. Create “Makefile based project” and set configuration according to image.

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

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.
Filed under: C/C++, DDK, WDF, WDK, Windows | Leave a Comment
Tags: WDK WDF C/C++ DDK Windows
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- ]*"
Filed under: C#, C/C++, Java, Linux | Leave a Comment
Tags: POSIX regular expression
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/
Filed under: C/C++, Linux, Windows | Leave a Comment
# 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]
Filed under: Linux | Leave a Comment
For uninstall/repair Windows Live Messenger 2009, you have to use "Windows Live Essentials" from “Add/Remove Programs”. Image will help you a lot.

Filed under: Windows | Leave a Comment
Tags: MSN Uninstall Repair Live 2009
Windows Live Writer – Test Blog
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…
Filed under: Uncategorized | 1 Comment
Compute Checksum Function
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);
}

Filed under: C/C++ | Leave a Comment
Command:
# find -name .svn -exec rm -rf {} \;
OR
# find -name “\.svn” -exec rm -rf {} \;
Filed under: Linux | Leave a Comment
Pakistan Zindabad…

“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)
Filed under: Uncategorized | Leave a Comment
WebServer in Java
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…
Filed under: Java | Leave a Comment
Gmail know your IP
Gmail has good feature to tell your last active session.

Filed under: Uncategorized | Leave a Comment
How to remove Bonjour Service
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:
- Open a Windows Run prompt window (Start – Run), type given command and press enter.
“C:\Program Files\Bonjour\mDNSResponder.exe” -remove - Navigate to the following folder in Windows Explorer.
“C:\Program Files\Bonjour” - Rename the mdnsNSP.dll file in that folder to mdnsNSP.old
- Restart your computer
- Delete the the “Program Files\Bonjour” folder
In the mean while I found some other parameters for “mDNSResponder.exe”. Check image!

Filed under: Uncategorized | 3 Comments
Given command will help to install Gnome-UI based Wireshark on linux,
# yum install ethereal-gnome
Filed under: Linux | Leave a Comment
Sultan Salahuddin Ayubi
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.
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
Filed under: Uncategorized | Leave a Comment
Recent Entries
- CIA Threats to Pakistan
- ISPR Documentary – Tenacious Ten – Pakistan Army
- Linux command to operate network connections
- How to generate new copy of NDIS_PACKET?
- How to compute checksum for TCP packets?
- Pakistan Win — ICC Twenty 20 World Cup 2009
- India, Israel and U.S.A are supporting terrorist groups in Pakistan
- How to control system reboot after crash?
- Helpful forums for Microsoft Device Driver
- How to solve Command line error D8004?
- How to build DDK source using vs2k5?
Categories
- Blogroll (2)
- C# (5)
- C/C++ (19)
- DDK (4)
- FireFox (6)
- fun & enjoy (9)
- Java (6)
- Linux (8)
- Network (6)
- News (7)
- Rotor [Microsoft] (1)
- Uncategorized (21)
- WDF (5)
- WDK (5)
- Windows (7)




