Is there a way to work with PyUSB under Windows (10) without changing drivers? - libusb

I tried to run PyUSB under Windows and in a first test simply wanted to read out all my USB devices with usb.core.find(find_all = True). But that failed with backends iibusb0 and libusb1. Meanwhile I read several times that I need to change the driver of the device I want to talk to through PyUSB eg using Zadig.
As I want to use the devices with different programs I can't change drivers.
So my questions are:
is changing the driver the only way to use PyUSB?
what other options are there for USB under Python and Windows
I downloaded USBTreeView and that runs fine - without changing any drivers. How does it do it? (I know its not Python)
Thanks for any help
Martin

Related

How to change the MAC address of a Xiamoi Redmi Note 11?

I've been looking to change the MAC address of my phone (Xiamoi Redmi Note 11) so that I can stay secure and private when joining publix networks. However, articles online suggest that it isn't possible on my current phone.
I have tried installing Terminal Emulator but it is an outdated app and does not work without a Mediatech chip, I believe. I tried using Termux instead but the instructions from before did not work. I got an error saying that ip link show command did not exist, and that I did not have permission to use ip link set.
I looked into gaining root access to my phone, but it doesn't seem possible, using conventional methods anyways. I'm not smart enough to figure out how to do these things on my own and so I've come here. So either I need a solution that fixes my problems before, or a brand new one. Preferably no rooting. I cant do that well.

upgrading from ossec to wazuh - "local/standalone" mode?

I am currently running ossec 3.6 in local mode and forwarding data to Splunk. I cannot seem to find something similar in wazuh - am I missing something? We really don't want to have a manager as all our data goes to Splunk anyway. We'd like to continue outputting ossec/wazuh data in Splunk format and send straight to Splunk. I've Googled and read the wazuh docs, but cannot find anything that addresses this. Is this possible?
Currently, there is no way to use standalone agents in Wazuh.
However, Wazuh managers also act as an standalone agent. Therefore, if the system you want to monitor is Linux, you can directly install the Wazuh-manager package there and it will take care of collecting and analyzing its local logs. Take a look at this doc, in case it helps Migrating OSSEC server.
If your target version is different from Linux (Windows, macOS, etc), there is no alternative and you will have to install a Wazuh-manager on a linux instance that the agent can report to. Agents without a manager cannot do anything.
I hope this solves your question!

Can't mount ext4-formatted USB

I have recently bought a USB, which is initially formatted using exFAT. Then I tried wiping it off and format it with ext4. But then, Linux Mint 20 doesn't seem to be able to mount it. When I checked the "disks" utility, the USB appeared, but it just displayed the loading loop. I tried to cancel the mount job, no luck either. Then I tried a live Linux Mint 19, also can't open the USB, so this is clearly not a problem with my existing computer.
Then I booted up my Windows copy (dual boot with Mint 20), plugged the USB in, formatted it to exFAT, and Windows can then open it. Then I boot up Mint 20 and live Mint 19 and both can open it. So my question is, do USB manufacturers restrict the type of filesystems a USB can have? I have never heard of this phenomenon, and can you give me some source to read more?
So I have dug into this a whole lot for the past few days and I think I know what's wrong. I tried to create an ext4 partition, didn't work. I then tried to fix it using fsck, also no dice. Then I tried to create an ext4 partition with less size (60GB), and then it works, with no corruption. It turns out that I just got scammed by the manufacturer.

Distribute windows virtual machine images

We use some virtual machines at work for testing. For example, if someone reports some weird bug that only happens on a specific OS we can just fire up the machine and debug it. Problem is that we may be outsourcing part of our testing workflow and we were discussing if it is legal or not to have Windows VM images available for third party download.
I would think that if we just set them and then remove the Key it is fine, but I cannot find somewhere were this is written explicitly. Has anybody had any problem like this before?

How to change browser mode on IE with selenium?

I'm trying to run a different browser mode on IE with selenium using c#. Here's some code:
var ieWebDriver = new InternetExplorerDriver(#"PATHTOWEBDRIVER");
ieWebDriver.Keyboard.SendKeys(Keys.F12);
ieWebDriver.Keyboard.SendKeys(Keys.LeftAlt);
ieWebDriver.Keyboard.SendKeys("b");
ieWebDriver.Keyboard.SendKeys(Keys.NumberPad7);
I can open the developer tools (f12) but I'm not able to change the browser mode. Is IE preventing this due security? if so, are there any other ways to render content with a lower IE version?
thanks
No. The IEDriver is going to launch whatever IE is installed on the machine.
Changing the 'browser mode' is not a true representation of that version you are changing it to. IE9 on IE7 Standards Mode is not a true version of IE7.
Thus, you are stuck in a problem. You want to test different versions of IE, how do you do it?
The problem is that Windows let's you only have one IE version on a Windows PC at any one time. Yes, there are hacks and programs around to get multiple versions (IE5 and above) to run on a single machine, but they are hacks. Hacks which are not going to work all that well, and still, even with this, you wouldn't even be able to give the IEDriverServer the flexiblity to do this.
You will have to have seperate Windows machines.
A workaround, which again is a hack, is to set browser emulation mode in the registry, as documented in SO question.
Note that in the above question, the accepted answer is not going to work but the other answer may do. As note the comment on that answer, is by the maintainer of the IEDriver itself, advising strongly against this.
Another workaround, I have not tested, is perhaps use the native C# Keyboard.SendKeys, as documented here in MSDN. Am unsure if it will work (don't think anyone has ever ried it), but it is another option.
Selenium supports cross-browser testing of different versions of the same browser, but it is not achieved by switching the version in the Browser Mode in F12 Tools.
See https://code.google.com/p/selenium/wiki/Grid2
You can set up virtual machines with different versions of IE that work as Selenium nodes and use Selenium Hub to connect to them. Let's say you have a virtual machine with Windows 7 which has IE9 installed. You would start a Selenium node there and specify that it accepts requests for IE9 tests. You would then create InternetExplorerDriver for version 9, connect to the hub and run the test. The hub finds out the node with IE9 and runs the test there.
Related post here:
https://stackoverflow.com/a/8524216/1080590
This is of course different to what you're trying to do on a single machine, but it's more reliable and prevents you from extra management of your local IE instance.