|
I don't think the framework would allow you to do that. You could mess up all the class info stuff including vtable. Plus you would have to know internal layout of the class data structure, and that might be system dependend (might work differently on mono or .netgnu)
You can download rotor and see how they lay it out.
If you try to get address of any managed type, you'll get error:
Cannot take the address or size of a variable of a managed type.
|
|
|
|
|
Hi Friends
I want to make a spyware. Please suggest me how the available spywares work
please let me know about their functionalities.
Where they check for the files, how they know which program is shareware etc.
Any pointers or help is appreciated.
Thanx a lot in advance
Naveen
|
|
|
|
|
softp_vc wrote:
how the available spywares work
From what I've seen of them. It is not something I wish to discuss.
softp_vc wrote:
please let me know about their functionalities
The two big functions they perform are: (1) They irritate users. (2) They steal information.
softp_vc wrote:
Where they check for the files
Where would you normally check for files? The filesystem perhaps.
softp_vc wrote:
Any pointers or help is appreciated
int* p;
Not so sure about the help though. I don't want more spyware out there.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
Colin Angus Mackay wrote:
int* p;
ROFL
Kev Pearman MCP
|
|
|
|
|
Sorry if i meant wrong by my question.
Actually i want to make a utility that shows that which freeware S/Ws i have downloaded in my system. i dont want to spy on others computer.
i just want to know that which useless or harmful S/W in my conputer is present so that i can remove them .
Hope i am clear about my thinking and intentions.
Please if anybody has any idea do let me know.
Regards,
Naveen
|
|
|
|
|
I can't help you with creating something to search for spyware because i wouldn't know where to start but if all you want to do is find out whats on your PC then try downloading SpyBot, it's free and worked well for me.
Kev Pearman MCP
|
|
|
|
|
Yes i have already used the spybot but i cant get the idea of how it works.
If any body knows please let me know.
I need the information urgently.
Thanx
Naveen
|
|
|
|
|
softp_vc wrote:
Any pointers or help is appreciated.
No one is going to help you write spyware, besides C# wouldn't be best suited for this anyway.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Thanx for ur prompt reply Nick.
Actually i want to make a utlity like spybot . Will u help me in this.
If C# is not good then in which technology i should write.
Suggest
Naveen
|
|
|
|
|
softp_vc wrote:
If C# is not good then in which technology i should write.
I told you, no one is going to help you with something like this. This is a C# forum, if you have a specific C# question please feel free to ask it here.
- Nick Parker My Blog | My Articles
|
|
|
|
|
There are so many different registry keys and values, and so many different files, you'll find it VERY difficult to write your own software without doing a ton of research on the spybots themselves. You can't write an application that will find any and all spyware from the first annoyances that came out to the new ones noone has thought of yet. Your app has to be able to look for signatures, just like virus scanning software does, and must be able to read those signatures from a file. The signatures would include registry information, filename information, data on the procedures the spyware uses, like renaming and replacing of files, even signature information to find spy code in other files.
But, you'll have to do a mountain of research on spyware first. No two spyware's work the exact same way and just searching for simple registry values and filenames will not do you any good. Your software must be able to adapt to the ever techniques of spyware.
Why don't you ask the people who wrote SpyBot...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
softp_vc wrote:
please let me know about their functionalities.
They annoy people to no end, and steal information.
|
|
|
|
|
Hi
I’m looking for same sample c# code that can extract outlook/exchange email attachments from a specified folder to a folder on a file system. I need this to be a client app rather than using exchanges server side event scripting.
Thanks in advance.
Swaity
|
|
|
|
|
how to create a link button to open this,
c:\inetpub\wwwroot\complaint\Attachment\aspnet-sample.pdf
actually i have a data grid,stating different upload of complaint with different path. How to specifically to create a link button for the file to open 1 by 1?
Thank you!
|
|
|
|
|
I am using the MSI installation project (Setup Project) in Visual Studio .NET 2003. Everything is fine except I can't see how to launch my installed program at the end of the installation. It isn't an Action I want to do - I want my program to run from its final resting place on the hard drive.
Bonus Question:
I'm trying to write some information to the registry (location of the executable) via the U/I of the project and I can't find keywords I can use in the registry like, say, [ApplicationFolder]. Anyone know how that works?
Thanks in advance for any help!
|
|
|
|
|
Okay...get ready to pull all of your hair out, run naked around the office going 'who-wha-baby, who-wha-baby' and needing a good drink tonight. You will find that there is very little documentation on the installer.
You will probably need to write a custom installer which will do the install and then do the action you want done. Fortunately you don't have to pass data to it, it gets' worse.
This sample does a check for winproxy then installs. You want to reverse this, do install then launch the process. BTW -- should you need it later, the exception throw in my logic is how you decide to stop an install based on your logic conditions.
Sorry, I never needed to add registry entries on my installs. We built them internally to the program as needed. Many of the variables are part of the SDK though.
[RunInstaller(true)]
public class CustomAction : System.Configuration.Install.Installer
{
private System.ComponentModel.Container components = null;
public CustomAction()
{
InitializeComponent();
}
#region Component Designer generated code
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
public override void Install(System.Collections.IDictionary stateSaver)
{
string fn = Path.Combine(Environment.SystemDirectory,@"Wspcpl32.cpl");
if ( File.Exists( fn ) )
{
StringBuilder msg = new StringBuilder();
msg.Append("TCA Navigator Install has detected the presence of the WinSock Proxy Client.");
msg.Append(System.Environment.NewLine);
msg.Append(System.Environment.NewLine);
msg.Append("It is necessary to reconfigure (via Control Panel) so that the client is not active.");
msg.Append(System.Environment.NewLine);
msg.Append("If you have already done so, click OK to continue with the install.");
msg.Append(System.Environment.NewLine);
msg.Append("Otherwise, hit Cancel, since continuing installation may make your system unstable.");
msg.Append(System.Environment.NewLine);
msg.Append(System.Environment.NewLine);
msg.Append("We recommending requesting that this be removed from your RADIA install configuration.");
if (MessageBox.Show(msg.ToString(), "Winsock Proxy Client detected",
MessageBoxButtons.OKCancel,
MessageBoxIcon.Stop,
MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
{
throw new InstallException("Installation cancelled by user action.");
}
}
base.Install(stateSaver);
This signature left intentionally blank
|
|
|
|
|
Wow - you have actual code written for the installer. I've been through the project in Visual Studio .NET 2003 and I can't even see anywhere that code can be written / edited. I'm assuming you are doing this through another means?
Thanks for your help!
Ken
|
|
|
|
|
Ken,
It took one guy that is a 'walking MSDN' to aid in finding this nugget of info. Check the link in my code comments for additional info.
For custom installer code you have to bake your own! Do this:
Create your Setup project within your solution.
Add another project that will ba a class library.
Create code similar to what I posted earlier.
Include output of that class library in your project file system.
Right-click the setup project and View...Custom Actions.
Add the project output for your custom installer at the point you want.
Compile everything.
Caviat Emptor
When you add the project output to your setup project, you do not seem capable of marking the properties (like it should be hidden, system, read-only) as near as I can determine. So the DLL is visible to your users and deleting the DLL can make your code unable to be uninstalled AND uninstallable. (can't remove it, can't install until you remove it)
I referenced the DLL directly but then source management gets freaky and keeps claiming the source control has a different DLL version and should it be left or overlayed.
So you are damned if you do and you are damned if you don't.
Michael
This signature left intentionally blank
|
|
|
|
|
I'm new to C# but not programming. I need to dynamically load dlls (native) and I have that part working with the [DllImport .... LoadLibrary ], and the with GetProcAddress.
What I am having trouble with, is the returning value from GetProcAddress. I have it returning an IntPtr. It is valid and I assume I should be able to use it.
In C++ I can cast the pointer to a function pointer. Is this possible in C#? I understand in .NET that function pointers are delegates and that you can't cast an IntPtr to a delegate type. So how do I go about calling the function that i have just obtained from a DLL?
Thanx
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
|
1. why would I search when I know that Heath Stewart answers questions on this forum within 20 mins?
2. I did actually search and find that, but that tells me that it'll be available in .NET 2.0. I thought maybe someone had a work around for pre 2.0.
There's gotta be some guru out there that has done it ?
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
|
Leppie,
thats a little harsh isn't it?
p.s. I wasn't the one that gave you the 1. For something as intelligent as your comment, it isn't worth it.
Jubjub
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
1. Because you always should search first. Good research is required skill for any good developer, and with forums like you have here today it's so easy compared to when I first started programming (no web; only gopher).
2. Nick did provide a work around that does work (though P/Invoking LoadLibrary really isn't necessary unless you want to check whether or not the DLL was actually loaded successfully since invoking the imported function won't tell you). Using the DllImportAttribute , the CLR will load the referenced DLL when necessary. You should still be able to unload it.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanx for your help Heath. Much appreciated.
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|