commit 1c7a658f4289cf9fbe53f3047bad95eb3210e875 Author: xfnw Date: Wed Aug 12 17:21:36 2020 -0400 searchng website diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b1d2ce --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +index +index/ +index/* +content +content +content/ +content/* +urls.txt +crawled +crawled/ +crawled/* +dep.sh + diff --git a/footer.html b/footer.html new file mode 100644 index 0000000..b269c2e --- /dev/null +++ b/footer.html @@ -0,0 +1,4 @@ + + +
+source diff --git a/header.html b/header.html new file mode 100644 index 0000000..a96f441 --- /dev/null +++ b/header.html @@ -0,0 +1,18 @@ + + + + + +shoxf + +

shoxf

+a powerful regex-based search engine for nmap results kinda like shodan +
+
+
+ + +
+
+ + diff --git a/huntnw b/huntnw new file mode 100755 index 0000000..589135b --- /dev/null +++ b/huntnw @@ -0,0 +1,11 @@ +#!/bin/bash + +QUERY=`echo $1| sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/g'` + + +for fn in $(grep -rEic "$QUERY" index | grep -v ':0' | sort -t: -nrk2 | awk -F: '{print $1}');do +PA=$fn +echo "
$PA

"`grep -i "$QUERY" $PA | sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/g'`"

" +done + + diff --git a/index.cgi b/index.cgi new file mode 100755 index 0000000..f1157c3 --- /dev/null +++ b/index.cgi @@ -0,0 +1,22 @@ +#!/bin/bash + +echo "Content-Type: text/html" +echo + + +cat header.html + + +Q=$(echo "$QUERY_STRING" | sed -n 's/^.*q=\([^&]*\).*$/\1/p' | sed "s/%20/ /g" | sed "s/+/ /g") + +if [[ $Q ]] +then + +./huntnw "$Q" + + +[ -z $(./huntnw "$Q") ] && echo "
No results :(
" +fi + +cat footer.html + diff --git a/style.css b/style.css new file mode 100644 index 0000000..e6df711 --- /dev/null +++ b/style.css @@ -0,0 +1,74 @@ + +body { +background: black; +font-family: monospace; +color: #aea; +} + +.preview, .box { +border: 1px solid #aea; +padding: 10px; +border-radius: 10px; +margin-top: 5px; +} + +.wrapper { +width: 700px; +margin: 0 auto; +} + +a { +text-decoration: none; +color: #aea; +} + +a:hover { +text-decoration: underline; +} + + +code, kbd, pre { +background: #333; +color: #aea; +} + +pre { +padding: 10px; +border-radius: 2px; +border: 1px solid #aea; +} + +.search-container input[type=text] { + padding: 6px; + margin-top: 3px; + font-size: 17px; + border: 3px solid #aea; + color: #aea; + background: #333; +} + +.search-container button { + float: left; + padding: 8px 10px; + margin-top: 3px; + margin-right: 16px; + background: #333; + font-size: 17px; + border: none; + cursor: pointer; + color:#aea; +} + +.search-container button:hover { + background: #111; +} + + +@media screen and (max-width:700px) { +.wrapper { +width: 100%; +} +} + + +