Projects STRLCPY 0rly Commits e1640f1f
🤬
  • ■ ■ ■ ■ ■ ■
    v1-bash/0rly.sh
    skipped 95 lines
    96 96  _realips=0
    97 97  ########
    98 98  _PROCESS() {
    99  - _ADDR="$1"
     99 + _ADDR=$(echo "$1" | awk -F ',' '{print $NF}')
    100 100   if grep -x -i -q "$_ADDR" "$_DONE"; then
    101 101   echo -e "duplicate address $_YLW skipped $_RST: $_ADDR"
    102 102   return
    skipped 11 lines
    114 114   ((_cfips=_cfips+1))
    115 115   return
    116 116   fi
    117  - _realips=$_realips+1
     117 + ((_realips=_realips+1))
     118 + echo -e "no cloudflare here $_GRN $_ADDR $_RST :^)"
    118 119   echo "$_ADDR" >> "$_RESULTS/noncloudflare.ips.txt";
    119 120   threadScan() {
    120  - _htmlReport() {
    121  - find "$_XML" -iname "$1*.xml" -print | while read -r line; do \
    122  - xsltproc "$1" -o "$_HTML/$1.html";
    123  - done
    124  - }
    125  - echo -e "Scanning$_YLW $1...$_RST";
    126  - "$_RUSTSCAN" -a "$1" -- "-Pn -A -T Aggressive -oX $_RESULTS/XML/$1.xml" >/dev/null;
     121 + echo -e "Scanning $_YLW $1... $_RST";
     122 + $_RUSTSCAN -a "$1" -- -Pn -A -T Aggressive -oX "$_RESULTS/XML/$1.xml" >/dev/null;
    127 123   echo "$_GRN done scanning $_YLW $1 $_RST. Generating HTML report...";
    128  - _htmlReport "$1";
     124 + xsltproc "$_RESULTS/XML/$1.xml" -o "$_HTML/$1.html";
    129 125   }
    130  - export -f treadScan
    131  - echo -e "no cloudflare here $_GRN $_ADDR $_RST :^)"
    132  - SHELL=$(type -p bash) sem -j10 threadScan $1
     126 + export -f threadScan
     127 + export _RUSTSCAN
     128 + export _RESULTS
     129 + export _HTML
     130 + export _YLW
     131 + export _RST
     132 + SHELL=$(type -p bash) sem -j10 threadScan "$_ADDR"
    133 133  }
    134 134   
    135 135  # # # --- --- ~*~ TIME FOR MAGIC ~*~ --- --- # # #
    skipped 3 lines
    139 139  touch "$_FINALTOSCAN"
    140 140  # ------------
    141 141  # <- open pipe for reading
    142  -cat $_FIFO | while read -r line; do echo "$line"; _PROCESS "$line"; done &exec 3>"$_FIFO" # define file descriptor
     142 +_scanning=true
     143 +cat $_FIFO | while read line; do _PROCESS "$line"; done & exec 3>"$_FIFO" # define file descriptor
    143 144  # ------------
    144 145  # open pipe for writing <-
    145  -tail -f "$_FINALTOSCAN" | awk -F ',' '{print $NF}' >&3 & # output to file descriptor
    146  -$_FINDOMAIN -i --resolvers "$_DNS" --target "$1" -u "$_FINALTOSCAN" >/dev/null
     146 +$_FINDOMAIN -i --resolvers "$_DNS" --target "$1" -u "$_FIFO" >/dev/null;
    147 147  # close file descriptor
     148 +while $_scanning; do
     149 + echo -n "."
     150 + sleep 1
     151 +done;
     152 + 
    148 153  exec 3>&-
    149 154  # ------------
    150 155   
    skipped 13 lines
Please wait...
Page is in error, reload to recover