|
Ilamparithi wrote:
How to write a antivirus program in vc++..
Wow - that's a tall order. I would suggest that you actually need to actually design and write one, and then ask for help on more specific issues.
But for starters, I would guess you need to find out how to:
* Hook the filesystem (so you know when files are being changed)
* Storage and update mechanisms for virus signatures
* Heuristics to detect new viruses
* Efficiently scan the changes to see if they match known virus signatures
* Isolate infected files and/or revert the changes being made (for isolation, you probably want a storage environment where files cannot be directly accessed or executed, like an encrypted virtual file system?)
* Internally validate your code to ensures it isn't infected by malicious code or otherwise affected by somethign trying to undermine it (man-in-the-middle attacks, shutting down components, outright replacing them, etc)
That's a big job, so I wish you good luck.
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|
|
OK look at one I wrote and see if this would help you.
If so I can post the source.
http://www.digitaltcp.com
Please remember I just check for one virus at a time at this point.
To do it properly you are going to have to do some array work.
Also may have a leak or two.
Wrote it in one night for a buddy the got WelchWorm.
Used a great deal of code off this site.
Best Wishes,
ez_way
|
|
|
|
|
I want to get the driver as listed in title .But I can't do it with GetDriverType because it's parameter can only indicate the cd-rom.And with
GetVolumeInformation I can't get more useful infomation.please give me some suggestion.
thank you!
Happy Gemini
|
|
|
|
|
When I call UpdateData(TRUE) on my non-modal dialog, a box pops up saying that this action is not supported.
Is UpdataData() strictly for modal dialogs?
I have several textfields linked to some UINT variables.
using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]
|
|
|
|
|
UpdateData works on modeless dialogs (and property pages). You probably have removed a control associated to a variable...
|
|
|
|
|
Hi,
Is there some document or thing that explains how to build an Ms Project Add-in using Visual C++ 6.0 ?
Bye
Braulio
|
|
|
|
|
Yes! Search codeproject & assciated web sights.
INTP
|
|
|
|
|
How to Convert the Gerber Files into Enhanced MetaFIles?
dadsadasd
|
|
|
|
|
hello my question is i am trying to make this little project to when i click on a button it will make a web page or text document load up i am still a bit new to C++ so i am not realy sure about how to go about this
any help will be very appriciated
thanks
nate
"Effort within the mind further limits the mind, because effort implies struggle towards a goal and when you have a goal, a purpose, an end in view, you have placed a limit on the mind"
|
|
|
|
|
There you go :
strFileName can be of any file type. The right exe will be launched according to the extension.
<br />
HINSTANCE nResult = ::ShellExecute(NULL,_T("open"),strFileName,NULL,NULL, SW_SHOW );<br />
if ( (int) nResult < 32 )<br />
{<br />
AfxMessageBox(_T("Cannot open file");<br />
}<br />
|
|
|
|
|
perfect thank you so much
"Effort within the mind further limits the mind, because effort implies struggle towards a goal and when you have a goal, a purpose, an end in view, you have placed a limit on the mind"
|
|
|
|
|
I am tring to create a groupbox on the client window
in a wtl project. I can not get it to work, it creates
a window the right size but does not paint the text
or the group outline. I have created buttons and checkboxes
and all work fine painting and all.
Here is the code for the groupbox I am tring to create.
hWndGroup = ::CreateWindow(WC_STATIC, _T("Check Item(s) to Disable."),
WS_CHILD | WS_VISIBLE | BS_GROUPBOX | BS_LEFTTEXT | BS_TEXT,
70, 50, 200, 130, m_hWnd, (HMENU)ID_GROUPBOX,
((LPCREATESTRUCT)lParam)->hInstance, NULL);
Thank You
Bo Hunter
|
|
|
|
|
hWnd = CreateWindow (WC_STATIC,_T("Check Item(s) to Disable."),WS_CHILD |..., 0, 0, width, 30+gHeight + WINDOWHEIGHT, NULL, NULL, ghInst, tData);
Best Wishes,
ez_way
|
|
|
|
|
Try WC_BUTTON for the window class.
Best regards
Oliver
|
|
|
|
|
Hi,
I would like to change the proxy settings of IE for dial-up connection. In INTERNET_PER_CONN_OPTION_LIST structure how do I specify the type of connection ? If I specify the connection type as NULL it modifies the global settings. But, I would like to change for dial-up.
-Thanks
Sudha
|
|
|
|
|
I have no idea if this will help! I just did a quick seach of MSDN (for "dial up) and found "Dialing Up the Internet with RAS".
INTP
|
|
|
|
|
The following snippet does what you want, I guess:
char szConnection[]=...;
char szProxy[]=...;
INTERNET_PER_CONN_OPTION_LIST List;
INTERNET_PER_CONN_OPTION Option[1];
unsigned long nSize = sizeof(INTERNET_PER_CONN_OPTION_LIST);
Option[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER;
Option[0].Value.pszValue = (LPSTR)szProxy;
List.dwSize = sizeof(INTERNET_PER_CONN_OPTION_LIST);
List.pszConnection = (LPSTR)szConnection;
List.dwOptionCount = 1;
List.dwOptionError = 0;
List.pOptions = Option;
InternetSetOption(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &List, nSize); The proxy is set for all protocols within the connection (HTTP, FTP, etc.) Hope this helps.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I need to understand Net Bios Names please.
A static NetBIOS name mapping consists of a NetBIOS name from 1 - 15 characters, a name type from 0 - 255, and a corresponding IP address. TAS resolves a NetBIOS name by first searching the list of static NetBIOS names and, failing that, broadcasting a query for the desired name. Augment name resolution to effectively cross routers by using the Enterprise Name Service or Windows Internet Naming Service.
Best Wishes,
ez_way
|
|
|
|
|
Hi
Look at this
http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_TCPIP_und_nr_NetBIOS.htm
and
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q163/4/09.asp&NoWebContent=1
It will say the story.
Best Regards,
A.Ilamparithi
|
|
|
|
|
Thanks will seek the url's now!
Here what I have so far from an article in 1995 for the last two digit sufix.
Thanks again
Name Number(h) Type Usage
--------------------------------------------------------------------------
<computername> 00 U Workstation Service
<computername> 01 U Messenger Service
<\\--__MSBROWSE__> 01 G Master Browser
<computername> 03 U Messenger Service
<computername> 06 U RAS Server Service
<computername> 1F U NetDDE Service
<computername> 20 U File Server Service
<computername> 21 U RAS Client Service
<computername> 22 U Microsoft Exchange Interchange(MSMail
Connector)
<computername> 23 U Microsoft Exchange Store
<computername> 24 U Microsoft Exchange Directory
<computername> 30 U Modem Sharing Server Service
<computername> 31 U Modem Sharing Client Service
<computername> 43 U SMS Clients Remote Control
<computername> 44 U SMS Administrators Remote Control
Tool
<computername> 45 U SMS Clients Remote Chat
<computername> 46 U SMS Clients Remote Transfer
<computername> 4C U DEC Pathworks TCPIP service on
Windows NT
<computername> 42 U mccaffee anti-virus
<computername> 52 U DEC Pathworks TCPIP service on
Windows NT
<computername> 87 U Microsoft Exchange MTA
<computername> 6A U Microsoft Exchange IMC
<computername> BE U Network Monitor Agent
<computername> BF U Network Monitor Application
<username> 03 U Messenger Service
<domain> 00 G Domain Name
<domain> 1B U Domain Master Browser
<domain> 1C G Domain Controllers
<domain> 1D U Master Browser
<domain> 1E G Browser Service Elections
<inet~services> 1C G IIS
<is~computer name=""> 00 U IIS
<computername> [2B] U Lotus Notes Server Service
IRISMULTICAST [2F] G Lotus Notes
IRISNAMESERVER [33] G Lotus Notes
Forte_$ND800ZA [20] U DCA IrmaLan Gateway Server Service
Best Wishes,
ez_way
|
|
|
|
|
Good information now may I ask a few question please.
In the following URL
http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_TCPIP_und_nr_NetBIOS.htm
I found in part the following>
Gateway Server Service
Computers running Windows 2000 are B-node by default and become H-node when they are configured with a WINS server. Windows 2000 can also use a local database file called Lmhosts to resolve remote NetBIOS names. The Lmhosts file is stored in the systemroot\System32\Drivers\Etc folder. For more information, see TCP/IP database files
I am running XP Home and have found the following information.
Under windows/system32/drivers/etc
file name type
host file
host.ics ics file
imhost.sam sam
networks file
quotes file
services file
protocols file
I am not using wins server so I might assume I am running in B-Mode.
How does one know which mode one is running in?
How does one retrieve the type of protocol any computer might be running?
How do I retrieve the netbios name for any computer.
Once this is done may I get the MAC address by polling with the netbios name?
Best Wishes,
ez_way
|
|
|
|
|
Hi,
Have a look at this site...
http://www.inetcat.org/software/nbtscan.html
I think it will answer ur questions.
Best Regards,
A.Ilamparithi
|
|
|
|
|
Will using UuidCreateSequential_t return the correct MAC address?
GUID uuid;
typedef RPC_STATUS (CALLBACK* UuidCreateSequential_t)(UUID*);
|
|
|
|
|
hi check this one out....
// GetMACUuid.cpp : Defines the entry point for the console application.
//
// Author: Khalid Shaikh [Shake@ShakeNet.com]
// Date: April 5th, 2002
//
// This program fetches the MAC address of the localhost by creating a UUID
// and obtaining the IP address through that
//
// Prewindows 2000 one should replace the function below
// UuidCreateSequential with UuidCreate
// Microsoft decided that it was not wise to put the MAC address in the UUID
// hence changed the algorithm in Windows 2000 and later to not include it.
//
// Supported in Windows NT/2000/XP
// Supported in Windows 95/98/Me
//
// Supports single NIC card.
#include "stdafx.h"
#include <windows.h>
#include <rpc.h>
#include <rpcdce.h>
#pragma comment(lib, "rpcrt4.lib")
// Prints the MAC address stored in a 6 byte array to stdout
static void PrintMACaddress(unsigned char MACData[])
{
printf("MAC Address: %02X-%02X-%02X-%02X-%02X-%02X\n",
MACData[0], MACData[1], MACData[2], MACData[3], MACData[4], MACData[5]);
}
// Fetches the MAC address and prints it
static void GetMACaddress(void)
{
unsigned char MACData[6];
UUID uuid;
UuidCreateSequential( &uuid ); // Ask OS to create UUID
for (int i=2; i<8; i++) // Bytes 2 through 7 inclusive are MAC address
MACData[i - 2] = uuid.Data4[i];
PrintMACaddress(MACData); // Print MAC address
}
int _tmain(int argc, _TCHAR* argv[])
{
GetMACaddress(); // Obtain MAC address of adapters
return 0;
}
Best Regards,
A.Ilamparithi
|
|
|
|
|
I'm not sure exactly what you're trying to accomplish but I'm familiar with NetBios names. It sounds like you're overcomplicating it! But isn't that usually the case?
A Netbios name is basically just the short name of a computer, whereas the DNS name includes the short name plus the domain suffix's. For example, if your computer name is BOB and you're in the Microsoft domain, then your Netbios name is "BOB" and your fully qualified DNS hostname would be bob.microsoft.com.
If you go to a command prompt and enter "hostname", it will return your NetBios name. You can use "nbtstat -c" to view a list of Netbios names that are in your local cache. Throw a "/?" switch to see how to refresh, clear, and reload your Netbios cache. When a computer starts up, it will typically attempt to fill your cache with netbios names that is needed to map drives, log into domains, run login scripts, locate exchange servers on the LAN etc., first through your local cache (LMHOST), then WINS (which is nothing more than a Netbios to IP name resolver), router tables if they're set up for it, and then by broadcasting. This is how networks are usually set up by default and where the node types come into play. You can modify the node type (broadcast, hybrid, etc.) to tell your computer in which order you'd like to resolve Netbios names and/or whether or not you want to use those various methods of resolution.
As long as DNS is set up properly, there should be no need to modify the LMHOST file on a workstation. The only time you should need to modify this file is in cases between two domain controllers where you've established a trust relationship, or for "tricking" a workstation into locating specific domain controllers for authentication to an NT domain (or Active Directory" by hardcoding it into the local cache for purposes of load balancing. Or if WINS is hosed, or your router tables are refreshing too quickly, etc., but again, on a well-planned network, you shouldn't need to make adjustments to the LMHOST file and doing so can result in an maintenance nightmare for network administrators. They'll sometimes use this file to get someone connected to a network resource as a quick-fix, rather than correcting the source of the problem, which will usually lead to even more problems later.
Hope that helps. If I can answer anything more specific, let me know.
Cheers,
Don
|
|
|
|
|