예제 #1
0
        public void UploadValidExe()
        {
            var bytes = new byte[2];
            bytes[0] = 77;
            bytes[1] = 90;
            var command = new xClient.Core.Packets.ServerPackets.DoUploadAndExecute(1, "bat.bat", bytes, 100, 0, false);

            command.IsValidExecuteFile();

            Assert.IsTrue(command.CorrectFileType, "Uploading a .exe file failed!");
        }
예제 #2
0
        public void UploadInValidFile()
        {
            var bytes = new byte[2];
            bytes[0] = 22;
            bytes[1] = 93;
            var command = new xClient.Core.Packets.ServerPackets.DoUploadAndExecute(1, "bat.bat", bytes, 100, 0, false);

            command.IsValidExecuteFile();

            Assert.IsFalse(command.CorrectFileType, "Uploading an invalid file worked!");
        }
예제 #3
0
        public void UploadValidBatch()
        {
            var bytes = new byte[2];

            bytes[0] = 101;
            bytes[1] = 99;
            var command = new xClient.Core.Packets.ServerPackets.DoUploadAndExecute(1, "bat.bat", bytes, 100, 0, false);

            command.IsValidExecuteFile();

            Assert.IsTrue(command.CorrectFileType, "Uploading a .bat file failed!");
        }
예제 #4
0
        public void UploadInValidFile()
        {
            var bytes = new byte[2];

            bytes[0] = 22;
            bytes[1] = 93;
            var command = new xClient.Core.Packets.ServerPackets.DoUploadAndExecute(1, "bat.bat", bytes, 100, 0, false);

            command.IsValidExecuteFile();

            Assert.IsFalse(command.CorrectFileType, "Uploading an invalid file worked!");
        }