Setup un/secure data channel.
(self, line)
| 474 | self.push('200 PBSZ=0 successful.') |
| 475 | |
| 476 | def cmd_prot(self, line): |
| 477 | """Setup un/secure data channel.""" |
| 478 | arg = line.upper() |
| 479 | if arg == 'C': |
| 480 | self.push('200 Protection set to Clear') |
| 481 | self.secure_data_channel = False |
| 482 | elif arg == 'P': |
| 483 | self.push('200 Protection set to Private') |
| 484 | self.secure_data_channel = True |
| 485 | else: |
| 486 | self.push("502 Unrecognized PROT type (use C or P).") |
| 487 | |
| 488 | |
| 489 | class DummyTLS_FTPServer(DummyFTPServer): |