It is difficult to suggest how to "fix" poorly designed code, particularly when the end result is unclear.
You obviously haven't tried to run it yourself, because the library is incorrectly named, and even if you fixed this you would see that it NEVER prints anything.
Since you asked, correcting the first 2 errors (and commenting out unused ...
If you think you have damaged one or more GPIO you can carry out a diagnostic test.
The test is a bash (command line) script called gpiotest.
The test requires the services of the pigpio library (pigpio may be preinstalled).
For the duration of the test nothing must be connected to the GPIO (no LEDs, wires, ribbon cables etc.).
The test ...
pigpio can not help with sniffing data over a USB link.
There are two principal reasons.
pigpio can only sniff GPIO 0 to 31. USB traffic is not connected to these GPIO.
pigpio can sniff data travelling at up to 500 thousand bits per second. Modern USB traffic is several orders of magnitude faster than pigpio can handle. Even the original low speed USB 1....
I think the default Linux SPI driver buffer size is 4096 bytes.
You will need to search for methods of making the buffer larger.
On the Pi set the buffer size by editing /boot/cmdline.txt and adding the following at the end of the (single) line.
where 250000 is your preferred buffer size.
The following lg script will then read 65536 ...