noxctf-Marcode-writeup

描述

Marcode (Mr. Code in Hebrew), Ineed your help!
I got a movie but I cant see it. It hypnotizes me.
please help me!
yours,
Gveretcode (Mrs. Code in Hebrew)

P.S.
change NOXCTF to noxCTF.
https://drive.google.com/open?id=1GkalBntU1s6d_sw_S5I4GinD8hBrh-C-

思路

链接地址下载后为一个视频,视频每一帧都是一个二维码,需要逐帧分析视频图片并对结果进行二次操作

步骤

  1. 视频逐帧保存为图片(2种方法)

    • FFmpeg
      $ffmpeg -i ffmpeg_test.avi frames_%03d.jpg -hide_banner

    • cv2

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      import cv2
      video_full_path="video/01_01.wmv"
      cap = cv2.VideoCapture(video_full_path)
      print cap.isOpened()
      frame_count = 1
      success = True
      while(success):
      success, frame = cap.read()
      print 'Read a new frame: ', success

      params = []
      #params.append(cv.CV_IMWRITE_PXM_BINARY)
      params.append(1)
      cv2.imwrite("video" + "_%d.jpg" % frame_count, frame, params)

      frame_count = frame_count + 1

      cap.release()
  2. 解析图片为url

  3. url转为对应字符

    打开url获取对应字符并批量替换

  4. 字符组成文字片段

    如使用Excel根据序号进行排序,获取排序后的字符

  5. 检查片段内容寻找flag

    1
    THE TWO MEN APPEARED OUT OF NOWHERE A FEW YNARDS APART IN THE NARROW MOONLIT LANE FOR A SECOND THEY STOOD QUITE STOILL WANDS DIRECTED AT EACH OTHERS CHESTS THEN RECOGNIZING EACH OTHER THEY STOWED THEIR WANDS BENEATH THEIR CLOAKS AND STARTED WALKING BRISKLY IN THE SAME DIRECTION NEWS ASKED THE TALLEXR OF THE TWO THE BEST REPLIED SEVERUS SNAPE THE LANE WAS BORDERED ON THE LEFT BY WILD LOWGROWING BRAMBLES ON THE RIGHT BY A HICGH NEATLY MANICURED HEDGE THE MENS LONG CLOAKS FLAPPED AROUND THEIR ANKLES AS THEY MARCHED THOUGHT I MIGHTT BE LATE SAID YAXLEY HIS BLUNT FEATURES SLIDING IN AND OUT OF SIGHT AS THE BRANCHES OF OVERHANGING TREES BROKE THE MOONLIGHT IT WAS A LITTLE TRICKIER THAN I EXPECTEFD BUT I HOPE HE WILL BE SATISFIED YOU SOUND CONFIDENT THAT YOUR RECEPTION WILL BE GOOD SNAPE NODDED BUT DID NOT ELABORATE THEY TURNED RIGHT INTO A WIDE DRIVAEWAY THAT LED OFF THE LANE THE HIGH HEDGE CURVED INTO THEM RUNNIVNG OFF INTO THE DISTANCE BEYOND THE PIR OF IMPAOSING WROUGHTIRON GATES BARRING THE MENS WAY NEITDHER OF THEM BROKE STEP IN SILENCE BOTH RAISED THEIR LEFT ARMS IN A KIND OF SALAUTE AND PASSED STRAIGHT THROUGH AS THOUGH THE DARK METAL WAS SMOKE THE YEW HEDGES MUFFLED THE SOKUND OF THE MENS FOOTSTEPS THERE WAS A RUSTLE SOMEWHERE TO THEIR RIGHT YAXLEY DREW HIS WAND AGAIN POINTING IT OVER HIS COMPANIONS HEAD BUT THE SOURCE OF THE NOISE PROVED TO BE NOTHING MORE THAN A PUREWHITE PEACOCK STERUTTING MAJESTICALLY ALONG THE TOP OF THE HEDGE HE ALWAYS DID HIMSELF WELL LUCIUS PEACOCKS YAXLEY THRUST HIS WAND BADCK UNDER HIS CLOAK WITH A SNORT A HANDSOME MANOR HOUSE GREW OUT OF THE DARKNESS AT THE END OF THE STRAIGHT DRIVE LIGHTS GLINTING IN THE DIAMOND PANED DOWNSTAAIRS WINDOWS SOMEWHERE IN THE DARK GARDEN BEYOND THE HEDGE A FOUNTAIN WAS PLAYING GRAVEL CRACKLED BENEATH THEIR FEET AS SNAPE AND YAXLEY SPED TOWARD THE FRONT DOOR WHICH SWUNG INWARD AT THEIR APPROACH THOUGH NOBODY HAD VISIBLY OPENED VIT THE HALLWAY WAS LARGE DIMLY LIT AND SUMPTUOUSLY DECORATED WITH A MAGNIFICENT CARPET COVERING MOST OF THE STONE FLOOR THE EYES OF THE PALEFACED PORTRAITS ON THE WALL FOLLOWED SNAPE AND YAXLEY AS THEY STRODE PAST THE TWO MEN HALTED AT A HEAVY WOODEN DOOR LEADING INTO THE NEXT ROOM HESITATED FOR THE SPACE OF A HEARTBEAT THEN SNAPE TURNED THE BRONZE HANDLE THE DRAWING ROOM WAS FULL OF SILENT PREOPLE SITTING AT A LONG AND ORNATE TABLE THE ROOMS USUAL FURNITURE HAD BEEN PUSHED CARELESSLY UP AGAINST THE WALLS ILLUMINATION CAME FROM A ROARING FIRE BENEATH A HANDSOME MARBLE MANTELPIECE SURMOUNTED BY A GILDED MIRROR SNAPE AND YAXLEY LINGERED FOR A MOMENT ON THE THRESHOLD AS THEIR EYES GREW ACCUSTOMED TO THE LACK OF LIGHT THEY WERE DRAWN UPWARD TO THE STRANGEST FEATURE OF THE SCENE AN APPARENTLY UNCONSCIOUS HUMAN FIGURE HANGING UPSIDE DOWN OVER THE TABLE REVOLVING SLOWLY AS IF SUSPENDED BY AAN INVISIBLE ROPE AND REFLECTED IN THE MIRROR AND IN THE BARE POLISHED SURFACE OF THE TABLE BELOW NONE OF THE PEOPLE SEATED UNDERNEATH THIS SINGULAR SIGHT WERE LOOKING AT IT EXCEPT FOR A PALE YOUNG MAN SITTING ALMOST DIRECTLY BELOW IT HE SEEMED UNABLE TO PREVENT HIMSELF FROM GLANCING UPWARD EVERY MINUTE OR SO YAXLEY SNAPE SAID A HIGH CLEAR VOICE FROM THE HEAD OF THE TABLE YOU ARE VERY NEARLY LATE THE SPEAKER WAS SEATED DIRECTLY IN FRONT OF THE FIREPLACE SO THAT IT WAS DIFFICULT AT FIRST FOR THE NEW ARRIVALS TO MAKE OUT MORE THAN HIS SILHOUETTE
    • 对照原文
    • 语法检查

Flag

flag:noxCTF{AVADAKEDAVRA}