Sharp-WMIExec
Sharp-WMIExec copied to clipboard
Doesn't seem to work against 127.0.0.1
After some debugging I get this error when going against localhost:
Target index: 1188 System.IndexOutOfRangeException: Index was outside the bounds of the array.
Seems to be in this code: char[] chars = new char[] { random_port_char_array[1], random_port_char_array[3], random_port_char_array[5], random_port_char_array[7], random_port_char_array[9] };
Fixed with this:
char[] chars = null; try { chars = new char[] { random_port_char_array[1], random_port_char_array[3], random_port_char_array[5], random_port_char_array[7], random_port_char_array[9] }; } catch { chars = new char[] { random_port_char_array[1], random_port_char_array[3], random_port_char_array[5], random_port_char_array[7] }; }
Hey, sorry I guess I never got notified about this issue? I recently just made some changes to the code and tested against localhost and it seems to be working okay. Let me know if you end up giving this another shot and if you still have issues.