Ajout du script
This commit is contained in:
parent
3807bb3634
commit
b30c82c391
2 changed files with 16 additions and 1 deletions
|
@ -171,7 +171,8 @@ C'est de l'hexadécimal. On récupère le tout dans python sous la forme d'un bu
|
|||
exif_data = "4D4A57564533324E4B524E474D5A4A544F5256553436544850424844455354494A555A4653364B5A474A4D5445544B584C453255344D5356474E475855514C5A4A555A4555334B5049524354435753584A4A5755365632474E5247573252544B4A56564655323232495247584F574C4E4A553245325243534E42484732534A524A5A4346534D433249354C47595453454E4D32453656324F4E4A4E4649554C324A564C565336434F4E4A4558515753584B4532553652434B4E564E4549554C594C4A57554B4E434E495241584F54544E4A553245365632534E4A4D5855524A544C4A4B464B36535A4B5249584F5432454C4A554655334B4B4E4A4D564F534C324C455A455532535049354954475454324A555A553256434B4E524846495A5A534A555A54434F493D"
|
||||
|
||||
d1 = bytearray.fromhex(exif_data)
|
||||
# On a en ASCII : MJWVE32NKRNGMZJTORVU46THPBHDESTIJUZFS6KZGJMTETKXLE2U4MSVGNGXUQLZJUZEU3KPIRCTCWSXJJWU6V2GNRGW2RTKJVVFU222IRGXOWLNJU2E2RCSNBHG2SJRJZCFSMC2I5LGYTSENM2E6V2ONJNFIUL2JVLVS6CONJEXQWSXKE2U6RCKNVNEIULYLJWUKNCNIRAXOTTNJU2E6V2SNJMXURJTLJKFK6SZKRIXOT2ELJUFU3KKNJMVOSL2LEZEU2SPI5ITGTT2JUZU2VCKNRHFIZZSJUZTCOI=
|
||||
print(d1)
|
||||
# Ce qui affiche : MJWVE32NKRNGMZJTORVU46THPBHDESTIJUZFS6KZGJMTETKXLE2U4MSVGNGXUQLZJUZEU3KPIRCTCWSXJJWU6V2GNRGW2RTKJVVFU222IRGXOWLNJU2E2RCSNBHG2SJRJZCFSMC2I5LGYTSENM2E6V2ONJNFIUL2JVLVS6CONJEXQWSXKE2U6RCKNVNEIULYLJWUKNCNIRAXOTTNJU2E6V2SNJMXURJTLJKFK6SZKRIXOT2ELJUFU3KKNJMVOSL2LEZEU2SPI5ITGTT2JUZU2VCKNRHFIZZSJUZTCOI=
|
||||
```
|
||||
|
||||
J'essaye de décoder l'ASCII du buffer comme de la base64 mais rien. Un peu d'aide exterieure (merci !) me suggère d'essayer la base32 dont je n'avais jamais entendu parler.
|
||||
|
@ -192,6 +193,8 @@ print(d3)
|
|||
# Ce qui affiche : ndh16_{% raw %}{{d7817ba3f2cf61f97e73023bf815ebf9ae2ac26dd30bc804a6b5464dee4989cce431f1621ed982fd41fa80006c89dcc17e53a4086afbcab3cbc8d773712e5863}}{% endraw %}
|
||||
```
|
||||
|
||||
[Télécharger le script au complet](/assets/code/basiq.py)
|
||||
|
||||
Le drapeau était donc :
|
||||
|
||||
```raw
|
||||
|
|
12
assets/code/basiq.py
Normal file
12
assets/code/basiq.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
exif_data = "4D4A57564533324E4B524E474D5A4A544F5256553436544850424844455354494A555A4653364B5A474A4D5445544B584C453255344D5356474E475855514C5A4A555A4555334B5049524354435753584A4A5755365632474E5247573252544B4A56564655323232495247584F574C4E4A553245325243534E42484732534A524A5A4346534D433249354C47595453454E4D32453656324F4E4A4E4649554C324A564C565336434F4E4A4558515753584B4532553652434B4E564E4549554C594C4A57554B4E434E495241584F54544E4A553245365632534E4A4D5855524A544C4A4B464B36535A4B5249584F5432454C4A554655334B4B4E4A4D564F534C324C455A455532535049354954475454324A555A553256434B4E524846495A5A534A555A54434F493D"
|
||||
|
||||
d1 = bytearray.fromhex(exif_data)
|
||||
print(d1)
|
||||
|
||||
import base64
|
||||
|
||||
d2 = base64.b32decode(d1)
|
||||
print(d2)
|
||||
|
||||
d3 = base64.b64decode(d2)
|
||||
print(d3)
|
Loading…
Reference in a new issue