Skip to content

Commit

Permalink
Explit HTTP scheme for wget
Browse files Browse the repository at this point in the history
  • Loading branch information
merces committed Nov 27, 2024
1 parent ab8712b commit 003d6cc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/reversing/bh_asminfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ bh_asminfo() {

local ins=$1

[[ -d $BASHACKS_CACHEDIR ]] || mkdir -p $BASHACKS_CACHEDIR
[[ -d $bashacks_cachedir ]] || mkdir -p $bashacks_cachedir

if [[ -s $BASHACKS_CACHEDIR/$ins.txt ]]; then
cat $BASHACKS_CACHEDIR/$ins.txt
if [[ -s $bashacks_cachedir/$ins.txt ]]; then
cat $bashacks_cachedir/$ins.txt
else
bh_cmd_wget -q faydoc.tripod.com/cpu/$ins.htm -O - \
wget -T10 -U "${bashacks_wget_user_agent}" \
-q https://faydoc.tripod.com/cpu/$ins.htm -O - \
| html2text \
| sed -n '/^===.*/,$p' \
| sed 's/^===.*/'${ins}'/' \
| tr _ ' ' \
| tee -a $BASHACKS_CACHEDIR/$ins.txt
| sed 's/^===.*/'${ins}'/;s/_/ /g' \
| tee -a $bashacks_cachedir/$ins.txt
fi
}

0 comments on commit 003d6cc

Please sign in to comment.