{"id":266,"date":"2011-05-04T22:45:42","date_gmt":"2011-05-04T21:45:42","guid":{"rendered":"http:\/\/bergatrollet.se\/blog\/?p=266"},"modified":"2011-05-04T23:00:15","modified_gmt":"2011-05-04T22:00:15","slug":"master-the-fra-challenge","status":"publish","type":"post","link":"http:\/\/bergatrollet.se\/blog\/2011\/05\/master-the-fra-challenge\/","title":{"rendered":"Master the FRA challenge"},"content":{"rendered":"<p>If you seek work at FRA (the military unit handling signal intelligence, now also in cables) you need to pass a test. The challenge is in Swedish and you have to be a Swedish citizen in order to get the job, but anyway you need to deciper a piece of code (x86 assembler) which will give you a string. It&#8217;s a quite nice lite stack excersise and even if you didn&#8217;t understand that, I guess you can tell the core part of the code anyway.<\/p>\n<p><a title=\"Jobb hos FRA\" href=\"http:\/\/fra.easycruit.com\/vacancy\/547834\/58086?iso=se\" target=\"_blank\">http:\/\/fra.easycruit.com\/vacancy\/547834\/58086?iso=se<\/a><\/p>\n<p>Just to shhow off, please find my piece of Delphi code below. Create a form, throw in a button and an editbox. Add the code to the event handler of the button:<\/p>\n<blockquote><p>procedure TForm1.Button1Click(Sender: TObject);<br \/>\nconst<br \/>\nindata : Array[1..20] of Byte = ($76,$75,$74,$2a,$63,$74,$66,$26,$7a,$6f,$24,$6f,$65,$6f,$63,$7c,$74,$7c,$74,$71);<\/p>\n<p>var<br \/>\noutdata : string;<br \/>\ncounter : byte;<br \/>\nbegin<\/p>\n<p>for counter := 1 to 20 do begin<br \/>\noutdata := outdata +\u00a0 Chr(indata[counter] XOR Counter)<br \/>\nend;<\/p>\n<p>Edit1.text := outdata;<\/p>\n<p>end;<\/p><\/blockquote>\n<p>Sorry &#8211; the editor f*cked up my indentation \ud83d\ude09<\/p>\n<p>Well it starts there. With the URL you are supposed to go on\u00a0 with phase 2 \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you seek work at FRA (the military unit handling signal intelligence, now also in cables) you need to pass a test. The challenge is in Swedish and you have to be a Swedish citizen in order to get the &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"http:\/\/bergatrollet.se\/blog\/2011\/05\/master-the-fra-challenge\/\"> <span class=\"screen-reader-text\">Master the FRA challenge<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3,4],"tags":[],"class_list":["post-266","post","type-post","status-publish","format-standard","hentry","category-code","category-delphi"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pkM6p-4i","jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/posts\/266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/comments?post=266"}],"version-history":[{"count":8,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/posts\/266\/revisions"}],"predecessor-version":[{"id":269,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/posts\/266\/revisions\/269"}],"wp:attachment":[{"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/media?parent=266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/categories?post=266"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bergatrollet.se\/blog\/wp-json\/wp\/v2\/tags?post=266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}