Beispiel #1
0
        private static Bitmap GetPngImage(ChallengePage page)
        {
            var request = page.CreateAuthenticatedWebRequest("https://www.hackthissite.org/missions/prog/2/PNG/");
            var resposne = request.GetResponse();
            var image = new Bitmap(resposne.GetResponseStream());

            Console.WriteLine("Retrieved png image");

            return image;
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            IEnumerable<WordDetails> words = BuildWords("wordlist.txt");

            var username = args[0];
            var password = args[1];

            var page = new ChallengePage("https://www.hackthissite.org/missions/prog/1/", username, password);
            IEnumerable<WordDetails> scrambledWords = GetScrambledWords(page.GetChallengePage());

            var unscrambledWords = UnscrambleWords(scrambledWords, words);
            page.SubmitAnswer(String.Join(",", unscrambledWords.ToArray()));

            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            var username = args[0];
            var password = args[1];

            var page = new ChallengePage("https://www.hackthissite.org/missions/prog/2/", username, password);

            // start challenge
            page.GetChallengePage();
            // get image for challenge
            var png = GetPngImage(page);

            var morse = ParseImage(png);
            Console.WriteLine("Morse encoded password: {0}", morse);

            var result = DecodeMorse(morse);
            Console.WriteLine("Decoded morse: {0}", result);

            page.SubmitAnswer(result);
        }