begin process at 2010 02 09 22:34:15
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

68xxx

 > DÉCONCATÉNATION DE CHAÎNE SOUS MASM32V8

DÉCONCATÉNATION DE CHAÎNE SOUS MASM32V8


 Information sur la source

Note :
7 / 10 - par 1 personne
7,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :68xxx Niveau :Débutant Date de création :07/09/2003 Date de mise à jour :07/09/2003 22:37:41 Vu :2 967

Auteur : Stormy

Ecrire un message privé
Commentaire sur cette source (1)
Ajouter un commentaire et/ou une note

 Description

Il s'agit d'une simple opération de déconcaténantion de chaîne pour extraire un ensemble de caractères. Le repère est le caractère *. Lorque AL est à 0, nous sommes au terme de la recherche (première lettre). Pour exemple, j'ai utilisé une simple MessageBox dont OFFSET réservé au texte subit la susdite transformation. ++

Source

  • .386
  • .model flat, stdcall
  • option casemap :none
  • include \masm32\include\windows.inc
  • include \masm32\include\user32.inc
  • include \masm32\include\kernel32.inc
  • includelib \masm32\lib\user32.lib
  • includelib \masm32\lib\kernel32.lib
  • .data
  • MsgBoxCaption db "ASM",0
  • MsgBoxText db "kikou*Déconcaténation de chaîne",0
  • Stripped BYTE MAX_PATH dup(?)
  • .code
  • start:
  • push OFFSET Stripped
  • push OFFSET MsgBoxText
  • call Stripper
  • push MB_OK
  • push OFFSET MsgBoxCaption
  • push OFFSET Stripped
  • push 0
  • call MessageBox
  • push 0
  • call ExitProcess
  • Stripper:
  • push esi
  • push edi
  • push ebx
  • push eax
  • mov esi,OFFSET MsgBoxText
  • mov ebx,esi
  • @@:
  • lodsb
  • cmp al,0
  • je EOF
  • cmp al,'*'
  • jne @b
  • mov ebx,esi
  • jmp @b
  • EOF:
  • mov edi,OFFSET Stripped
  • mov esi,ebx
  • @@:
  • lodsb
  • stosb
  • cmp al,0
  • jne @b
  • pop eax
  • pop ebx
  • pop edi
  • pop esi
  • ret
  • End start
.386
.model flat, stdcall
option casemap :none     

  include    \masm32\include\windows.inc
  include    \masm32\include\user32.inc
  include    \masm32\include\kernel32.inc
  
  includelib \masm32\lib\user32.lib
  includelib \masm32\lib\kernel32.lib

.data
 MsgBoxCaption   db "ASM",0
 MsgBoxText      db "kikou*Déconcaténation de chaîne",0
 Stripped        BYTE MAX_PATH dup(?)

.code

start:
 push OFFSET Stripped
 push OFFSET MsgBoxText
 call Stripper
 
 push MB_OK 
 push OFFSET MsgBoxCaption
 push OFFSET Stripped
 push 0
 call MessageBox
 
 push 0
 call ExitProcess

Stripper:
 push esi
 push edi
 push ebx
 push eax
 mov esi,OFFSET MsgBoxText
 mov ebx,esi

@@:
 lodsb
 cmp al,0
 je EOF
 cmp al,'*'
 jne @b
 mov ebx,esi
 jmp @b

EOF:
 mov edi,OFFSET Stripped
 mov esi,ebx

@@:
 lodsb
 stosb
 cmp al,0
 jne @b
 pop eax
 pop ebx
 pop edi
 pop esi
 ret

End start

 Conclusion

Simple mais cela peut toujours servir à quelqu'un...


 Sources du même auteur

INSCRIPTION HKLM ET COPIE SYSTEM
Source avec Zip Source avec une capture EDEN KILLER D'APPLICATIONS HOSTILES
Source avec Zip CRYPTOR (PROGRAMME DE CRYPTAGE DE TYPE SIMPLE XOR, RCL & RCR...
Source avec Zip SHELL EXEC (MA$M)

 Sources de la même categorie

LECTURE ET ECRITURE D'UN CARACTERE ET D'UNE CHAINE DE CARACT... par yasmus
Source avec Zip EN UTILISANT LES INTERRUPTIONS DE DOS , CECI EST UN CODE DE... par iltir_master
GENERIC WINDOWS XP URL DOWNLOAD AND EXECUTE SHELLCODE par theXman
AFFICHAGE D'UN CARRÉ (ROUGE), CENTRÉ, SUR LA POINTE, QUI SE ... par steven007
CALCUL DU LOGARITHME NÉPÉRIEN ET DE L'EXPOSANT (X+1)M par steven007

Commentaires et avis

Commentaire de Marcal le 18/09/2003 00:50:46

Merci, il m'a été utile. Et aussi pour comprendre le killer de Illwill d'où est pris le code.

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,499 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales