UI: Add HideInput component to internal exploits

This commit is contained in:
Ilija Lazoroski 2021-08-18 11:49:01 +02:00
parent 9a0837656b
commit a8cc0e6781
2 changed files with 16 additions and 4 deletions

View File

@ -112,6 +112,18 @@ export default function UiSchema(props) {
aws_keys: {
classNames: 'config-field-hidden'
}
},
exploits: {
exploit_lm_hash_list:{
items: {
'ui:widget': HideInput
}
},
exploit_ntlm_hash_list: {
items: {
'ui:widget': HideInput
}
}
}
}
};

View File

@ -24,15 +24,15 @@ class HideInput extends React.PureComponent {
render() {
return (
<div>
<InputGroup className='mb-3'>
<InputGroup className='mb-4'>
<FormControl
value={this.props.value || ''}
type={this.state.hidden ? 'text' : 'password'}
onChange={(event) => this.onChange(event)}
/>
<InputGroup.Append>
<InputGroup.Text>
<i onClick={this.toggleShow} className={this.state.hidden ? 'fas fa-eye-slash' : 'fas fa-eye'}></i>
<InputGroup.Text onClick={this.toggleShow} >
<i className={this.state.hidden ? 'fas fa-eye-slash' : 'fas fa-eye'}></i>
</InputGroup.Text>
</InputGroup.Append>
</InputGroup>