Skip to content

Instantly share code, notes, and snippets.

View eira-fransham's full-sized avatar

Eira Fransham eira-fransham

  • Berlin
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#! /bin/bash
ilok_details=$(lsusb | grep 'iLok' | grep -P -o '[0-9a-f]+:[0-9a-f]+')
for ilok in $ilok_details; do
ilok_vendor=$(echo $ilok | grep -P -o '^[0-9a-f]+')
ilok_product=$(echo $ilok | grep -P -o '[0-9a-f]+$')
ilok_device=$(cat <<-HERE
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
stdfmod:
movd esi,xmm0
movd edx,xmm1
mov eax,esi
mov ecx,edx
and eax,0x7fffffff
and ecx,0x7fffffff
cmp eax,ecx
jae 4011a0 <stdfmod+0x30>
cmp ecx,0x7f800000