Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

[Dev] Funceble is too slow #95

Closed
funilrys opened this issue Aug 18, 2017 · 40 comments
Closed

[Dev] Funceble is too slow #95

funilrys opened this issue Aug 18, 2017 · 40 comments
Assignees
Labels

Comments

@funilrys
Copy link
Owner

To quote @mitchellkrogza from mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites@4b9dbd8:

funceble from dev branch seems much slower, seems to be ignoring timeout of 2 seconds. Used to finish these builds in 20 minutes now already at 33 minutes and not even halfway ???

@funilrys funilrys added the bug label Aug 18, 2017
@funilrys funilrys added this to the Discovered Issues milestone Aug 18, 2017
@funilrys funilrys self-assigned this Aug 18, 2017
funilrys referenced this issue in mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites Aug 18, 2017
@funilrys funilrys added this to In Progress in Issues [Discovered] Aug 18, 2017
funilrys added a commit that referenced this issue Aug 18, 2017
@funilrys
Copy link
Owner Author

@mitchellkrogza can you test the fix ?

@mitchellkrogza
Copy link

@funilrys testing now on https://travis-ci.org/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites/builds/266230204

@mitchellkrogza
Copy link

@funilrys 😢 it finished but in double the time it usually takes. It seems specifically .se .it and .com.br are slowing it down a lot.

screen shot 2017-08-19 at 11 27 42 am

@funilrys
Copy link
Owner Author

@mitchellkrogza saw it 👍

It's related to #94

I'm into it right now 😉 The only problem is for some obscure reason for those domains those line interpret the regex as single line https://github.com/funilrys/funceble/blob/dev/funceble#L1113-L1126 🤔

@mitchellkrogza
Copy link

@funilrys let me know when you get your head around it. I'm online so will test immediately when you push a new fix.

@funilrys
Copy link
Owner Author

@mitchellkrogza let's test 👍 😸

@mitchellkrogza
Copy link

Underway - https://travis-ci.org/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites/builds/266243864 ..... lots of duplications occuring ???

@funilrys
Copy link
Owner Author

Sorry but I need to laugh a second 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹 😹

Let's fix it 👍

@mitchellkrogza
Copy link

mitchellkrogza commented Aug 19, 2017

That was one hell of a good laugh 🤣 Cancelling build.

@funilrys
Copy link
Owner Author

Hell yeah 😹

@funilrys
Copy link
Owner Author

Note: That issue occurs only if we call -f, --file or --file=myawesomelist.domain

@mitchellkrogza
Copy link

.md and .sk domains also giving that weird output

@funilrys
Copy link
Owner Author

With the last commit @mitchellkrogza ?

@mitchellkrogza
Copy link

Nope sorry, with the previous one .... my bad .... still running previous dev version on my ubuntu box and just saw those. Will wait for update.

@mitchellkrogza
Copy link

Note: That issue occurs only if we call -f, --file or --file=myawesomelist.domain

Why is that?

@funilrys
Copy link
Owner Author

funilrys commented Aug 19, 2017

A note for myself 😹 it's not happening when you use ./funceble -d github.com but it appears if you use ./funceble -f myawesome.list

funilrys added a commit that referenced this issue Aug 19, 2017
@funilrys
Copy link
Owner Author

funilrys commented Aug 19, 2017

@mitchellkrogza Let's fix test 👍

@funilrys
Copy link
Owner Author

17514 that's the number of line I had to read to find where was the problem 😹 😹 😹 😹 😹 😹 😹

@mitchellkrogza
Copy link

@funilrys
Copy link
Owner Author

Okay, let me see the difference between https://travis-ci.org/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites/builds/265988407 && https://travis-ci.org/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites 😭

@mitchellkrogza
Copy link

I feel your pain 😢

@funilrys
Copy link
Owner Author

Note: [That] https://www.diffchecker.com/arpDbj4l don't explain everything 😭

@mitchellkrogza
Copy link

Can't understand how the execution time has grown so much ??

Execution Time:
00:45:33

 Status      Percentage   Numbers     
----------- ------------ -------------
ACTIVE      99%          2509        
INACTIVE    0%           2           
INVALID     0%           0           


@funilrys
Copy link
Owner Author

The diffchecker tell us the difference between before (left) and now (right) so it's the refactoring that produces that issue 😭

@mitchellkrogza
Copy link

Any way I can run this in full debug mode on by Ubuntu box? Maybe produce a debug output file to see what's causing the execution time to double?

@funilrys
Copy link
Owner Author

I already did it over a 100 domain list but the only way is to rewrite the way we read the whois output 😅

But if you want a huge and full debug ..
bash -x ./funceble -ex -h -p -f myawesome.list 2>&1 | tee executiondebug

@mitchellkrogza
Copy link

Pulling latest dev branch now to my Ubuntu box and will run this for an hour and see. If I stop it will we still get the debug output needed?

@funilrys
Copy link
Owner Author

yes it's a real time input into executiondebug

@mitchellkrogza
Copy link

Running now but already I see the script pausing continuously with message expect -c 'set echo "-noecho"; set timeout 30; spawn -noecho /bin/bash -c "whois -h whois.nic.site 24x7-server-support.site > /var/tmp/whois.9524"; expect timeout { exit 1 } eof { exit 0 }'

@mitchellkrogza
Copy link

And also like here:

+ notSupported=true
+ case ${domainExtension} in
+ [[ true == true ]]
++ whois -h whois.iana.org 66cpwgln.space
++ awk '/refer/{print $NF}'
+ referer=whois.nic.space
+ regexWhois='(.*)whois(.*)'
+ [[ whois.nic.space =~ (.*)whois(.*) ]]
+ notSupported=false
+ [[ ! 66cpwgln.space =~ (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?) ]]
+ [[ false == false ]]
+ [[ 66cpwgln.space != '' ]]
+ [[ whois.nic.space != '' ]]
+ timeout 30 'whois -h whois.nic.space 66cpwgln.space > /var/tmp/whois.9524'
+ time=30
+ touch /var/tmp/whois.9524
+ command='/bin/bash -c "whois -h whois.nic.space 66cpwgln.space > /var/tmp/whois.9524"'
+ expect -c 'set echo "-noecho"; set  timeout 30; spawn -noecho /bin/bash -c "whois -h whois.nic.space 66cpwgln.space > /var/tmp/whois.9524"; expect timeout { exit 1 } eof { exit 0 }'

@funilrys
Copy link
Owner Author

What about bash -x ./funceble -t 1 -ex -h -p -f myawesome.list 2>&1 | tee executiondebug ?

@funilrys
Copy link
Owner Author

Okay let's change the default timeout to 2 or 3 seconds

@mitchellkrogza
Copy link

Shall i wait for fix? And then run this again? Stopped it after just 5 minutes already 8mb debug file.

funilrys added a commit that referenced this issue Aug 19, 2017
@funilrys
Copy link
Owner Author

stop ip :)

My last commit only change the timeout from 30 to 3s

@mitchellkrogza
Copy link

Running now, no pausing yet. Let me run this on Hacked Malware Sites and see how it does on Travis

@mitchellkrogza
Copy link

funilrys added a commit that referenced this issue Aug 19, 2017
@funilrys
Copy link
Owner Author

Let's test this one 😭 This one there's no loop one line after another I only search the line that get the expiration date 😅

@mitchellkrogza
Copy link

@mitchellkrogza
Copy link

screen shot 2017-08-19 at 4 57 59 pm

funilrys added a commit that referenced this issue Aug 19, 2017
funilrys added a commit that referenced this issue Aug 19, 2017
funilrys added a commit that referenced this issue Aug 19, 2017
funilrys added a commit that referenced this issue Aug 19, 2017
@funilrys
Copy link
Owner Author

Okay, @mitchellkrogza let's resume my long last night and day :)

As you can see, we have a real problem which looks like it's out of the code ...

funilrys added a commit that referenced this issue Aug 20, 2017
funilrys added a commit that referenced this issue Aug 20, 2017
@funilrys funilrys moved this from In Progress to Done in Issues [Discovered] Aug 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Development

No branches or pull requests

2 participants