|
It's the only way to be sure[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Wise words! If they had listened, they might have survived ...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
@OriginalGriff You're still believe I have a operating system virus problem. But that i resolve it already using a boot scan cleaning. Im asking something else instead. On non operating system, on a diferent drive, drive D in my case, where everything is STORED, and very rarely executed, there inside all those (pasive) installers, the AV found infected executables, that are most of the time passive.
That is the issue. I moved away all the installers on external drive, AntiVirus scan D drive and eliminate majority of exe in there, since its automatic, and then i copy back from my external drive to the D drive all the infected originals, in the hope there is a way to repair them. Im not talking about C drive program files stuff where is installed everything. But passive storred programs, on diferent drive away from C. All i want is to clean them.
|
|
|
|
|
No, I believe that you've had a massive virus problem - and once this is over you need to do two things:
1) Identify where the viruses came from and put systems in place to ensure this doesn't happen again.
And
2) Install a good quality AV, and keep it updated and scanning regularly.
If whatever you used to remove the viruses from your system disk can't safely get rid of the virus problem on the data drive, then those files are screwed: modern viruses are complicated beasties who mutate code in files, not just add to it (they try to hide by not adding identifiable strings) - so unless the virus scanner knows exactly what a virus did to the file, it can't be undone. And when you get multiple infections it very quickly becomes impossible to work out the order in which the code was corrupted and thus have no idea what the original looked like. Without that, your files will be and will always remain too dangerous to run - and must be replaced with "clean" versions, either from backup, or by re-install.
Me? If I find a computer with that many viruses, I will always reformat and load from clean - because I've seen the results when multiple viruses start "fighting" among themselves and the problems that causes the AV scanner. It's honestly quicker, easier, and safer to start over from scratch!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
@OriginalGriff Very interesting what you tell me. I didn't think on this 'mutation' ability before. In reality, my installers (some of them) have cracks too. And patches. And some of them i know they are 'infected' but with old and too general viruses that are very easy to remove from a single quick scan. Those files were see as being the latest and meanest viruses on earth from this late and updated AV perspective. They are treating almost everything as the 'highest risk' and every executable that it finds. I like more those old AV they were more dedicated than these general atitude from today. But that is me. I scanned my backup software from another OS, from a laptop, and it find those eazy cracks viruses. I also scanned with a very old AV as well and it confirmed this (forgotten) reality. Eh well. The conclusion, the secondary external scan, didn't find those mean viruses that i get from my PC. So my installers are not 'infected' by anything new that lurks in my computer. In the best case is a false positive. In reality, is a wrapper of some sort attributing the same virus signature to every installer i have there. Or its just how the new AV think these days, if he found a high level virus, then everything it finds it must be that high.
|
|
|
|
|
and from other old ones i had in the past.
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
|
|
|
|
|
_Q12_ wrote: Is there a posibility to clean all these installers? No; part of the original gets overwritten. Data that is overwritten is lost and cannot be retrieved.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Nope. You're screwed.
Usually, when an .EXE gets infected, part of all of the original file gets overwritten. There's no way to reverse that except by restoring from a known-good backup.
.MSI's are no different. They're just a database file with tables, columns and rows. That data can easily be overwritten too.
|
|
|
|
|
You're doomed. Your machine shouldn't even be allowed to connect to the internet.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Hi!
Am trying to secure any chosen file with the supplied password in a Desktop Application in C#.
But index was out of range of the Array as almost make my work miserable.
I;ll be glad if anyone can assist me debug these codes.
This is my code
<pre>
else if (!(string.IsNullOrWhiteSpace(txtCryptoSecretKey.Text) && string.IsNullOrWhiteSpace(txtFilePath.Text)))
{
timerPrgBar.Enabled = true;
//try
//{
byte[] fileContent = File.ReadAllBytes(txtFilePath.Text);
byte[] passwordTmp = Encoding.ASCII.GetBytes(txtCryptoSecretKey.Text);
byte[] keys = new byte[fileContent.Length];
for (int i = 0; i < fileContent.Length; i++)
keys[i] = passwordTmp[i % passwordTmp.Length];
// Encrypt
byte[] result = new byte[fileContent.Length]; //Changed from byte to long
byte[] abc = new byte[fileContent.Length]; //Just Added
if (rbEncrypt.Checked)
{
table = new byte[0, 256]; //just added
for (int i = 0; i < fileContent.Length; i++)
{
byte value = fileContent[i];
byte key = keys[i];
int valueIndex = -1, keyIndex = -1;
for (int j = 0; j < 256; j++)
if (abc[j] == value)
{
valueIndex = j;
break;
}
//just added, from here
else
{
valueIndex = 0;
break;
}
// to here.
for (int j = 0; j < 256; j++)
if (abc[j] == key)
{
keyIndex = j;
break;
}
//just added, from here
else
{
keyIndex = 0;
break;
}
// to here.
//table = new byte[i,i]; //this worked but throwing out of bound array.
//Index was outside the bound of the Array
result[i] = table[keyIndex, valueIndex];
}
// Save result to new file with the same extension
String fileExt = Path.GetExtension(txtFilePath.Text);
SaveFileDialog sd = new SaveFileDialog();
sd.Title = "Save Encrypted File";
sd.Filter = "Files (*" + fileExt + ") | *" + fileExt;
if (sd.ShowDialog() == DialogResult.OK)
{
File.WriteAllBytes(sd.FileName, result);
timerPrgBar.Enabled = true;
MessageBox.Show("Your File as been Encrypted Successfully.", "Secured!", MessageBoxButtons.OK, MessageBoxIcon.Information);
} //RemoveOwnedForm;
}
// Decrypt
else
{
table = new byte[0,256]; //just added
for (int i = 0; i < fileContent.Length; i++)
{
byte value = fileContent[i];
byte key = keys[i];
int valueIndex = -1, keyIndex = -1;
for (int j = 0; j < 256; j++)
if (abc[j] == key)
{
keyIndex = j;
break;
}
for (int j = 0; j < 256; j++)
if (table[keyIndex, j] == value)
{
valueIndex = j;
break;
}
result[i] = table[keyIndex, valueIndex];
//result[i] = abc[valueIndex];
}
// Save result to new file with the same extension
String fileExt = Path.GetExtension(txtFilePath.Text);
SaveFileDialog sd = new SaveFileDialog();
sd.Title = "Save Decrypted File";
sd.Filter = "Files (*" + fileExt + ") | *" + fileExt;
if (sd.ShowDialog() == DialogResult.OK)
{
File.WriteAllBytes(sd.FileName, result);
timerPrgBar.Enabled = true;
MessageBox.Show("File Revealed Successfully.", "Revealed!", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
}
</pre>
|
|
|
|
|
Where does the error occur?
|
|
|
|
|
We can't tell you "It's there!" because we would need your code running with your data to find out exactly where it is happening, and what values are causing the problem - and you need that before you can start looking at why it's wrong!
All we can do is explain why it's causing a problem. Arrays in C# are a sequence of values accessed via an index: and that index must be between zero and the "number of values minus one". So if you have an array containing five integers for example, then valid indexes are 0, 1, 2, 3, and 4. All other indexes will give an error because the value you are trying to deal with does not exist.
So you can say:
i = arr[0];
i = arr[1];
i = arr[2];
i = arr[3];
i = arr[4]; But not:
i = arr[-1];
i = arr[5];
i = arr[666];
And your code uses several arrays, any of which could be the source of the problem.
So, it's going to be up to you.
Fortunately, you have a tool available to you which will help you find out what is going on: the debugger. If you don't know how to use it, a quick Google for "Visual Studio debugger" should give you the info you need.
Put a breakpoint on the first line in the function, and run your code through the debugger. Then look at your code, and at your data and work out what should happen manually. Then single step each line checking that what you expected to happen is exactly what did. When it isn't, that's when you have a problem, and you can back-track (or run it again and look more closely) to find out why.
Sorry, but we can't do that for you - time for you to learn a new (and very, very useful) skill: debugging!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
If anyone has VS2017, mine is broken and won't properly create VSIX projects.
No amount of updates, or even installing VS2019 and using that has worked. Google provides no explanation for the E_INVALIDARG error I'm getting.
Here's what I need: I need an Empty VSIX project, called NewtVS, targeting .NET 4.71 or 4.72 (don't care)
it needs one AsyncPackage in it, called NewtVS.cs
That's it.
If anyone can create that and zip it to a dropbox or something i'd be eternally grateful.
(I've tried creating a VSIX project in visual studio 2017 and adding an AsyncPackage. I tried doing the same thing in visual studio 2019, same error message.)
So once again, here's the steps to create what I need, for any kind soul who wants to help me (i'm blocked on this)
1. Create a new C# VSIX project (in the Extensibility section of the project templates), and name it "NewtVS"
2. Add New Item, Extensibility->AsyncPackage, name it NewtVS.cs
zip it and give me a link. don't build it or it will just get that much bigger
This used to work for me. =(
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
|
And you expect this "new" VSIX project someone else will bake for you will run on your "broken" VS 2017 / 2019 installations?
That's optimistic. I would think the priority is to fix your installations.
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
|
|
|
|
|
Yes, because of where and when the error occurs. Fixing my installation requires time i don't have for this project, especially with no guarantee of a fix
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
So go with the Nuclear Option: reformat and reinstall.
Or ... set up a VM, and a clean install on that. Might be quicker than playing around in the hope that whatever corrupted your installation doesn't corrupt a "clean" project and render that useless as well.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
i think i'll just write my own installer.
this will all take longer and be more expensive than actually doing that.
microsoft can get bent.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
codewitch honey crisis wrote: i think i'll just write my own installer.
codewitch honey crisis wrote: microsoft can get bent. But you'll write your own installer using Microsoft Tools.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
doesn't mean i have to like them. if their tools weren't broke i wouldn't be coding this in the first place.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
codewitch honey crisis wrote: if their tools weren't broke Works for everyone else. So, it's possible you did something to break it. Or your antivirus or your antimalware. The point is you don't even know why it's broken but of course you love to hate on Microsoft.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
i really doubt i did something to break it. it worked once, and if creating a project breaks visual studio for future projects then it's visual studio that's broken.
and i have no reason to think it works for anyone else since i have yet to see someone successfully create a VSIX using the steps i outlined. just sayin.
i don't love to hate on microsoft. I used to work for them. i was on the visual studio team and on the windows team at one point.
they frustrate me sometimes, and VS2017 *has been dodgy for several folks on CP even*
but that's all it is. VS is still far better than any competing IDE. I thought KDevelop might one day be a contender but it fizzled. Eclipse crashes if i look at it sideways.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
codewitch honey crisis wrote: i was on the visual studio team Ah ha!!! We have found the problem.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
lol
ZurdoDev wrote: Everyone is born right handed. Only the strongest overcome it.
as a fellow southpaw, i endorse this.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|