-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: copy to clipboard Payloads (web browser) (#26)
- Loading branch information
Showing
9 changed files
with
706 additions
and
42 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React, {useState} from 'react'; | ||
|
||
const GoogleDorks = () => { | ||
|
||
|
||
const DorkList = 'site:'; | ||
const DorkList2 = 'intitle:'; | ||
const DorkList3 = 'inurl:'; | ||
|
||
// const searchDork = DorkList[0]; | ||
const [value, setValue] = useState(""); | ||
const [inurlValue, setInurlValue] = useState(""); | ||
|
||
const handleClick = () => { | ||
const site = value; | ||
const inurlValueDork = DorkList3 + inurlValue; | ||
const searchUrl = `https://www.google.com/search?q=${DorkList}` + site + ` ` + inurlValueDork; | ||
|
||
console.log(searchUrl); | ||
window.open(searchUrl, "_blank"); | ||
}; | ||
|
||
|
||
return ( | ||
<div> | ||
<input type="text" placeholder={"site:"} name={"site"} value={value} | ||
onChange={(e) => setValue(e.target.value)}/> | ||
|
||
<input type="text" placeholder={"inurl:"} name={"inurl"} value={inurlValue} | ||
onChange={(e) => setInurlValue(e.target.value)}/> | ||
|
||
<br/> | ||
<button className="button-final" onClick={handleClick}> Submit</button> | ||
|
||
</div> | ||
); | ||
}; | ||
export default GoogleDorks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const GoogleDorks = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
color: #fff; | ||
padding: 0 30px; | ||
position: relative; | ||
z-index: 1; | ||
margin-top: 80px; | ||
width: 500px; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,11 @@ | ||
import React, {useState} from 'react'; | ||
|
||
import React from 'react'; | ||
|
||
const Homepage = () => { | ||
|
||
|
||
const DorkList = 'site:'; | ||
const DorkList2 = 'intitle:'; | ||
const DorkList3 = 'inurl:'; | ||
|
||
// const searchDork = DorkList[0]; | ||
const [value, setValue] = useState(""); | ||
const [inurlValue, setInurlValue] = useState(""); | ||
|
||
const handleClick = () => { | ||
const site = value; | ||
const inurlValueDork = DorkList3 + inurlValue; | ||
const searchUrl = `https://www.google.com/search?q=${DorkList}` + site + ` ` + inurlValueDork; | ||
|
||
console.log(searchUrl); | ||
window.open(searchUrl, "_blank"); | ||
}; | ||
|
||
|
||
return ( | ||
<div> | ||
<input type="text" placeholder={"site:"} name={"site"} value={value} | ||
onChange={(e) => setValue(e.target.value)}/> | ||
|
||
<input type="text" placeholder={"inurl:"} name={"inurl"} value={inurlValue} | ||
onChange={(e) => setInurlValue(e.target.value)}/> | ||
|
||
<br/> | ||
<button className="button-final" onClick={handleClick}> Submit</button> | ||
|
||
<h1>Homepage</h1> | ||
</div> | ||
); | ||
); | ||
}; | ||
|
||
export default Homepage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,47 @@ | ||
import React from "react"; | ||
import React, {useState} from "react"; | ||
import SyntaxHighlighter from 'react-syntax-highlighter'; | ||
import {CopyToClipboard} from 'react-copy-to-clipboard'; | ||
import {PayloadsContainer, PayloadsCopyToClipboard, PayloadsHeading,} from "./PayloadsElements"; | ||
import {AiOutlineCopy} from 'react-icons/ai'; | ||
import {docco} from 'react-syntax-highlighter/dist/esm/styles/hljs'; | ||
|
||
const Payloads = () => { | ||
return ( | ||
<div> | ||
<h1>Payloads</h1> | ||
</div> | ||
); | ||
|
||
const PayloadsList = [ | ||
"onload=alert(1)><svg/1=", | ||
">alert(1)</script><script/1=", | ||
]; | ||
|
||
const [state, setState] = useState({ | ||
value: '', | ||
copied: false, | ||
}); | ||
|
||
const PayloadsListMap = PayloadsList.map((payload, index) => { | ||
return ( | ||
<PayloadsCopyToClipboard key={index}> | ||
<SyntaxHighlighter language="javascript" style={docco}> | ||
{payload} | ||
</SyntaxHighlighter> | ||
<CopyToClipboard text={payload} onCopy={() => setState({value, copied: true})}> | ||
<AiOutlineCopy/> | ||
</CopyToClipboard> | ||
</PayloadsCopyToClipboard> | ||
); | ||
}); | ||
|
||
return ( | ||
<PayloadsContainer> | ||
<PayloadsHeading>Payloads</PayloadsHeading> | ||
<SyntaxHighlighter>TTY shell</SyntaxHighlighter> | ||
|
||
{PayloadsListMap} | ||
|
||
|
||
{state.copied ? <span style={{color: 'red'}}>Copied.</span> : null} | ||
|
||
</PayloadsContainer> | ||
); | ||
}; | ||
|
||
export default Payloads; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const PayloadsContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
color: #fff; | ||
padding: 0 30px; | ||
position: relative; | ||
z-index: 1; | ||
margin-top: 80px; | ||
width: 500px; | ||
`; | ||
|
||
|
||
export const PayloadsCopyToClipboard = styled.div` | ||
display: flex; | ||
`; | ||
|
||
export const PayloadsHeading = styled.h2` | ||
`; | ||
|
||
|
||
|
||
export const CopyToClipboard = styled.h2` | ||
`; | ||
|