安全的CRT发送命令到主机VBS

时间:2018-08-08 13:12:45

标签: vbscript secure-crt

嘿,我尝试制作一个可以登录并向主机/服务器发送命令的简单脚本:

Sub Main 
    crt.Screen.Synchronous = True
    crt.Session.Connect "ip adress"
    crt.Screen.WaitForString "Username: "
    crt.Screen.Send "username" & chr(13)
    crt.Screen.WaitForString "Password: "
    crt.Screen.Send "password" & chr(13)
    crt.Screen.Send "?" & chr(13)
    crt.Screen.Synchronous = False
End Sub

我的问题是它什么也不会发送。

1 个答案:

答案 0 :(得分:0)

它现在可以工作:

#import "ViewController.h"

@interface ViewController ()<UIAlertViewDelegate>
@end

@implementation ViewController

- (void)viewDidLoad {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Idioma"
                                                    message:@"" 
                                                   delegate:self
                                          cancelButtonTitle:@"Cancel"
                                          otherButtonTitles:@"English",@"Español",@"Deustch", nil];
    alert.delegate = self;
    [alert show];
}


-(void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
    if(buttonIndex == 0) { //CANCEL
        NSLog(@"0");
    }
    else if(buttonIndex == 1) {
        NSLog(@"1");
    }
    else if(buttonIndex == 2) {
        NSLog(@"2");
    }
    else if (buttonIndex == 3) {
        NSLog(@"3");
    }
}

@end