Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 00:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



False positive

Discussion on False positive within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
Hackslary21st's Avatar
 
elite*gold: 32
Join Date: Jul 2013
Posts: 79
Received Thanks: 5
False positive

Hallo, ich hab das Problem, das mein Programm immer als false positive erkannt wird -.- (von meinem Av, Avast)

Eigentlich weiss ich noch nicht mal wieso das ein false positive ist, ich überprüfe nur ob die Textfelder leer sind.

Ich hab extra dafür noch mal ein komplett neues Projekt erstellt wo nichts ausser das drinne ist, aber trozdem immer noch false positive.

Code:
string username = textBox1.Text;
string password = textBox2.Text;

if (username == "" || password == "") {
   MessageBox.Show("Please fill out both textfields");
} else {
   MessageBox.Show("Username: " + username + "\n" + "Password: " + password);
}
Weiss einer wie man das machen kann ohne das es als "Win32 Evo:gen" oder
so ähnlich erkannt wird? Oder mach ich irgendwas falsch? Hab echt keine ahnung wie ich sonst prüfen soll ob die leer sind.
Hackslary21st is offline  
Old 08/03/2013, 15:34   #2
 
Cyperghost's Avatar
 
elite*gold: 0
The Black Market: 379/0/0
Join Date: Jan 2013
Posts: 11,449
Received Thanks: 210
frag einfach mal so ab

Code:
string username = textBox1.Text;
string password = textBox2.Text;

if (username == "" || password == "" || username == null || password == null || username == " " || password == " " || username == string.Empty || password == string.Empty)
 {
   MessageBox.Show("Please fill out both textfields");
} 
else 
{
   MessageBox.Show("Username: " + username + "\n" + "Password: " + password);
}
Cyperghost is offline  
Old 08/03/2013, 22:58   #3
 
elite*gold: 0
Join Date: Aug 2012
Posts: 236
Received Thanks: 94
Quote:
Originally Posted by Cyperghost View Post
Code:
if (username == "" || password == "" || username == null || password == null || username == " " || password == " " || username == string.Empty || password == string.Empty)
Solange du das nicht ernst meinst und du die Kurzschlussauswertung vernachlässigst...

Ansonsten (allgemein):
Code:
if (String.IsNullOrEmpty (username) || String.IsNullOrEmpty (passwort)) {
Da aber der Text von Textfeldern nicht null sein kann (ich schlage jetzt nicht nach), reicht eine Längenprüfung:
Code:
// Benutzername hat falsche Länge
if (username.Length < 4 || username.Length > 16) {
Noch besser wäre es, reguläre Ausdrücke über die Eingaben laufen zu lassen.


Aber zu deinem Problem: Du hast also ein neues Projekt erstellt, zwei Textfelder hinausgezogen und dazu noch eine Schaltfläche? Ich bin mir ziemlich sicher, dass sich das Antivirenprogramm dann nicht melden wird. Vielleicht ist jener Code doch nicht alles?
Tasiro is offline  
Old 08/05/2013, 08:55   #4
 
elite*gold: 5
Join Date: Mar 2008
Posts: 460
Received Thanks: 436
Vielleicht hast du aber auch ein Virus auf deinem PC der von Avast nicht erkannt wird,
dein Avast erkennt nur die "ableger".

Mein Vorschlag pack dir mal ein anderen Virenscanner (Avira oder so) drauf und lass den mal drüberlaufen. Ggf. Rechner neu installieren.

Sollte es wirklich nur der Code sein, ist ein "FalsePositive" ausgeschlossen und die erzeugten exen haben WIRKLICH einen Virus intus.
SwarN is offline  
Old 08/05/2013, 12:04   #5
 
'Heaven.'s Avatar
 
elite*gold: 1
The Black Market: 331/0/0
Join Date: Jun 2012
Posts: 5,819
Received Thanks: 3,200
Quote:
Originally Posted by Cyperghost View Post
frag einfach mal so ab

Code:
string username = textBox1.Text;
string password = textBox2.Text;

if (username == "" || password == "" || username == null || password == null || username == " " || password == " " || username == string.Empty || password == string.Empty)
 {
   MessageBox.Show("Please fill out both textfields");
} 
else 
{
   MessageBox.Show("Username: " + username + "\n" + "Password: " + password);
}
Code:
if (textBox1.Text.Trim() == "" || textBox2.Text.Trim() == "" )
 {
   MessageBox.Show("Please fill out both textfields");
} 
else 
{
   MessageBox.Show("Username: " + textBox1.Text+ "\n" + "Password: " + textBox2.Text);
}
Wie oben schon gesagt kann der Text von einer Textbox nicht null/Nothing sein...
'Heaven. is offline  
Reply

Tags
c#, false positive


Similar Threads Similar Threads
[Request-Discussion] False-Positive Virus
11/21/2011 - SRO Private Server - 8 Replies
Hmm, does anyone have an sro client that does not scan for false positive virus.... getting annoying having so many people complain about this >.<
How to stop the AVG false positive virus pop up
09/19/2008 - CO2 Guides & Templates - 10 Replies
OK some of you might know this, and its also posted on the CO forums but a lot of people don't read so I'm posting it here with pictures. You can do this before you even get a false positive, but if you do it after chances are you are going to need a new conquer.exe, i recommend futures cracked conquer.exe. Step 1. Open AVG and click on 'Resident Shield'.(Underlined Below) http://i161.photobucket.com/albums/t207/SouL_27/S tep1.jpg
stopbadware false positive
07/27/2008 - Main - 14 Replies
Recently elitepvpers have been flagged as badware site from google. This is a false positive and has no effect to our visitors. The warning got already removed from stopbadware.org and will be removed from the google search results in the next few days (as soon google updates the index).



All times are GMT +1. The time now is 00:42.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.