Willkommen
myGully
Links
Forum
13.03.10, 19:16
#1
Banned
Registriert seit: Mar 2010
Ort: Dritte Brückepfeiler rechts
Beiträge: 101
Bedankt: 13
C++ Char Problem
Hallo liebe Leute,
hab mir ein kleines Programmel geschrieben dass die Passwörter sicherer macht. Sprich einfach Zeichen umwandeln und diese so machen dass sie sicher vor Wordlists Attacken ist und auch noch Sonderzeichen enthält. Genutzt wird 1 Edit Fenster als Eingabe, 1 Edit Fenster als Ausgabe und 1 Button für die Umwandlung. Das Prog. funkt wunderbar bis auf den kleinen aber lästigen Fehler dass ich immer folgende Fehlermeldung bekomme:
Der Quellcode sieht folgendermaßen aus:
PHP-Code:
#include <vcl.h>
#pragma hdrstop
#include <string.h>
#include <ctype.h>
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 * Form1 ;
//---------------------------------------------------------------------------
__fastcall TForm1 :: TForm1 ( TComponent * Owner )
: TForm ( Owner )
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1 :: Button1Click ( TObject * Sender )
{ char Ein ;
Edit2 -> Text = "" ;
for( int i = 1 ; i < 120 ; i ++)
{ Ein = Edit1 -> Text [ i ];
if( Ein == 'a' ) Edit2 -> Text = Edit2 -> Text + "4" ;
if( Ein == 'A' ) Edit2 -> Text = Edit2 -> Text + "4" ;
if( Ein == 'b' ) Edit2 -> Text = Edit2 -> Text + "8" ;
if( Ein == 'B' ) Edit2 -> Text = Edit2 -> Text + "8" ;
if( Ein == 'c' ) Edit2 -> Text = Edit2 -> Text + "(" ;
if( Ein == 'C' ) Edit2 -> Text = Edit2 -> Text + "(" ;
if( Ein == 'd' ) Edit2 -> Text = Edit2 -> Text + "|)" ;
if( Ein == 'D' ) Edit2 -> Text = Edit2 -> Text + "|)" ;
if( Ein == 'e' ) Edit2 -> Text = Edit2 -> Text + "3" ;
if( Ein == 'E' ) Edit2 -> Text = Edit2 -> Text + "3" ;
if( Ein == 'f' ) Edit2 -> Text = Edit2 -> Text + "|=" ;
if( Ein == 'F' ) Edit2 -> Text = Edit2 -> Text + "|=" ;
if( Ein == 'g' ) Edit2 -> Text = Edit2 -> Text + "9" ;
if( Ein == 'G' ) Edit2 -> Text = Edit2 -> Text + "9" ;
if( Ein == 'h' ) Edit2 -> Text = Edit2 -> Text + "|-|" ;
if( Ein == 'H' ) Edit2 -> Text = Edit2 -> Text + "|-|" ;
if( Ein == 'i' ) Edit2 -> Text = Edit2 -> Text + "1" ;
if( Ein == 'I' ) Edit2 -> Text = Edit2 -> Text + "1" ;
if( Ein == 'j' ) Edit2 -> Text = Edit2 -> Text + "j" ;
if( Ein == 'J' ) Edit2 -> Text = Edit2 -> Text + "j" ;
if( Ein == 'k' ) Edit2 -> Text = Edit2 -> Text + "/<" ;
if( Ein == 'K' ) Edit2 -> Text = Edit2 -> Text + "/<" ;
if( Ein == 'l' ) Edit2 -> Text = Edit2 -> Text + "|_" ;
if( Ein == 'L' ) Edit2 -> Text = Edit2 -> Text + "|_" ;
if( Ein == 'm' ) Edit2 -> Text = Edit2 -> Text + "|\\/|" ;
if( Ein == 'M' ) Edit2 -> Text = Edit2 -> Text + "|\\/|" ;
if( Ein == 'n' ) Edit2 -> Text = Edit2 -> Text + "|\\|" ;
if( Ein == 'N' ) Edit2 -> Text = Edit2 -> Text + "|\\|" ;
if( Ein == 'o' ) Edit2 -> Text = Edit2 -> Text + "()" ;
if( Ein == 'O' ) Edit2 -> Text = Edit2 -> Text + "()" ;
if( Ein == 'p' ) Edit2 -> Text = Edit2 -> Text + "p" ;
if( Ein == 'P' ) Edit2 -> Text = Edit2 -> Text + "p" ;
if( Ein == 'q' ) Edit2 -> Text = Edit2 -> Text + "q" ;
if( Ein == 'Q' ) Edit2 -> Text = Edit2 -> Text + "q" ;
if( Ein == 'r' ) Edit2 -> Text = Edit2 -> Text + "r" ;
if( Ein == 'R' ) Edit2 -> Text = Edit2 -> Text + "r" ;
if( Ein == 's' ) Edit2 -> Text = Edit2 -> Text + "s" ;
if( Ein == 'S' ) Edit2 -> Text = Edit2 -> Text + "s" ;
if( Ein == 't' ) Edit2 -> Text = Edit2 -> Text + "t" ;
if( Ein == 'T' ) Edit2 -> Text = Edit2 -> Text + "t" ;
if( Ein == 'u' ) Edit2 -> Text = Edit2 -> Text + "|_|" ;
if( Ein == 'U' ) Edit2 -> Text = Edit2 -> Text + "|_|" ;
if( Ein == 'v' ) Edit2 -> Text = Edit2 -> Text + "\\/" ;
if( Ein == 'V' ) Edit2 -> Text = Edit2 -> Text + "\\/" ;
if( Ein == 'w' ) Edit2 -> Text = Edit2 -> Text + "\\|/" ;
if( Ein == 'W' ) Edit2 -> Text = Edit2 -> Text + "\\|/" ;
if( Ein == 'x' ) Edit2 -> Text = Edit2 -> Text + "><" ;
if( Ein == 'X' ) Edit2 -> Text = Edit2 -> Text + "><" ;
if( Ein == 'y' ) Edit2 -> Text = Edit2 -> Text + "y" ;
if( Ein == 'Y' ) Edit2 -> Text = Edit2 -> Text + "y" ;
if( Ein == 'z' ) Edit2 -> Text = Edit2 -> Text + "2" ;
if( Ein == 'Z' ) Edit2 -> Text = Edit2 -> Text + "2" ;
if( Ein == ' ' ) Edit2 -> Text = Edit2 -> Text + " " ;
if( Ein == '?' ) Edit2 -> Text = Edit2 -> Text + "!S" ;
if( Ein == '!' ) Edit2 -> Text = Edit2 -> Text + "l" ;
if( Ein == '"' ) Edit2 -> Text = Edit2 -> Text + "'" ;
if( Ein == '0' ) Edit2 -> Text = Edit2 -> Text + "O" ;
if( Ein == '1' ) Edit2 -> Text = Edit2 -> Text + "I" ;
if( Ein == '2' ) Edit2 -> Text = Edit2 -> Text + "II" ;
if( Ein == '3' ) Edit2 -> Text = Edit2 -> Text + "III" ;
if( Ein == '4' ) Edit2 -> Text = Edit2 -> Text + "IV" ;
if( Ein == '5' ) Edit2 -> Text = Edit2 -> Text + "V" ;
if( Ein == '6' ) Edit2 -> Text = Edit2 -> Text + "VI" ;
if( Ein == '7' ) Edit2 -> Text = Edit2 -> Text + "VII" ;
if( Ein == '8' ) Edit2 -> Text = Edit2 -> Text + "VII" ;
if( Ein == '9' ) Edit2 -> Text = Edit2 -> Text + "IX" ;
}
}
Der Compiler mit dem ich das gemacht habe heist C++ Builder 2010.
Wäre nett wenn mir wer sagen könnte wie ich den Error weckbekomme
Danke schon ma im Vorraus, liebe Grüße oorly
13.03.10, 19:53
#2
Banned
Registriert seit: Sep 2009
Ort: /root/
Beiträge: 815
Bedankt: 640
for(int i=1;i<120;i++)
daran wirds liegen.
Egal ob 120 zeichen eingegeben wurden oder nicht, wird immer versucht 120 zeichen zu lesen.
for(int i=1; i<= AnzahlZeichen; i++)
Dank der VCL hast du keine Speicherzugriffsverletzung.
13.03.10, 20:06
#3
Banned
Registriert seit: Mar 2010
Ort: Dritte Brückepfeiler rechts
Beiträge: 101
Bedankt: 13
super danke hat funktioniert.
wenn ich noch ne frage stellen dürfte:
Was für Files brauche ich damit ich das Prog weiterschicken kann? reicht die .exe allein oder benötige ich noch andere files. Der Empfänger soll NUR das programm starten und benutzen können.
13.03.10, 20:11
#4
Banned
Registriert seit: Sep 2009
Ort: /root/
Beiträge: 815
Bedankt: 640
theoretisch schon.
Falls zur Exe noch ein name.exe.manifest erzeugt wird musst du die auch mitschicken.
Falls du fragst weils bei irgendwem nich funktioniert gib mal die Fehlermeldung.
13.03.10, 20:13
#5
Banned
Registriert seit: Mar 2010
Ort: Dritte Brückepfeiler rechts
Beiträge: 101
Bedankt: 13
naja habs grad mit kollege getestet bei dem schlägt der antivirus andauernt alarm... liegt das an dem dass es ne .exe ist und der author unverfifiziert ist? oder was is da das problem.
13.03.10, 20:27
#6
Banned
Registriert seit: Sep 2009
Ort: /root/
Beiträge: 815
Bedankt: 640
lad das Programm mal hoch. Kann sein das da bloß die Heuristik anschlägt.
Ansonsten nen Bugreport an den Virenscanner Hersteller einschicken.
13.03.10, 20:34
#7
Banned
Registriert seit: Mar 2010
Ort: Dritte Brückepfeiler rechts
Beiträge: 101
Bedankt: 13
da bitte die file direkt:
direkt die .exe ohne verpackung, nur der quelltext von oben also zu 99,9999% kein virus wenns einer ist bin ich gut
das mit der strlen ist noch nicht drinnen darum noch ne fehlermeldung aber das tut dem hier nicht bei.
13.03.10, 20:50
#8
Banned
Registriert seit: Sep 2009
Ort: /root/
Beiträge: 815
Bedankt: 640
Dein Kumpel nutzt Norton Antivirus oder?
Wenn ja dann ist es nen Heuristiktreffer.
Da is alles in Ordnung, kannst die Datei ja bei Symantec einschicken damit die das verbessern können.
13.03.10, 20:51
#9
Banned
Registriert seit: Mar 2010
Ort: Dritte Brückepfeiler rechts
Beiträge: 101
Bedankt: 13
dankeschön chef
kann closed werden, schönen abend wünsch ich dir
Forumregeln
Du kannst keine neue Themen eröffnen
Du kannst keine Antworten verfassen
Du kannst keine Anhänge posten
Du kannst nicht deine Beiträge editieren
HTML-Code ist Aus .
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:33 Uhr.
().