Sharp-WMIExec icon indicating copy to clipboard operation
Sharp-WMIExec copied to clipboard

Doesn't seem to work against 127.0.0.1

Open benpturner opened this issue 5 years ago • 2 comments

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] };

benpturner avatar Aug 04 '19 16:08 benpturner

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] }; }

benpturner avatar Aug 04 '19 16:08 benpturner

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.

checkymander avatar Apr 23 '20 16:04 checkymander