let badusb = require(
"badusb"
);
let notify = require(
"notification"
);
let dialog = require(
"dialog"
);
badusb.setup({ vid: 0xAAAA, pid: 0xBBBB, mfr_name:
"Flipper"
, prod_name:
"Zero"
});
dialog.message(
"BadUSB DEMO For Windows"
,
"Press OK to start"
);
if
(badusb.isConnected()) {
notify.blink(
"green"
,
"short"
);
print(
"USB is connected"
);
delay(1000);
badusb.press(
"GUI"
,
"r"
);
delay(1000);
badusb.println(
"chrome"
);
badusb.press(
"ENTER"
);
delay(1000);
badusb.println(
"www.baidu.com"
);
badusb.press(
"ENTER"
);
notify.success();
}
else
{
print(
"USB not connected"
);
notify.error();
}
badusb.quit();