-
Notifications
You must be signed in to change notification settings - Fork 939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaned up SmsDetector.java implementation, related issues #615, #537 #635
Conversation
@smarek Thanks for modifying code and improving something similar to what my last PR was going to do. Nice to see someone helping out on detection because this is what the app is about. |
Also so from tests I done regexp seems very slow a bit like string format. |
I feel blessed to see you repsoning here, @banjaxbanjo. Since you've closed your important pull requests, do you think you could add your changes back again after I've merged this on sunday? |
@SecUpwN I will have a look at my offline dev sometime this week with original PR to see what can be merged. No promises😉 |
No need to promise anything, I hate promises but love honesty. ;-) Shall I merge the proposed changes? |
The offline class I have for sms detection is copy & paste the full class and uses a different method for reading buffer, Just needs minor formatting and its 10 times better than current class, be no problem to merge this PR by smarek but if I was to add the previous PR I would be overwriting this pr for it to work the way I intended. Can work behind scenes on class with smarek so we can finish this class for good. |
Would you really do that? This would be absolutely lovely! I guess @smarek can add the necessary changes to this PR so that it gets polished and does not have to be closed. Thanks and happy hacking! :) |
@SecUpwN will try @banjaxbanjo please push your code somewhere online and let me know, i'll be happy to assist you to rebase it on top of latest dev (or maybe merge it with changes proposed by this PR). |
Tracking info: https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/pull/619/commits |
So I've rebased the original PR#619 into second commit, to be clear about what has changed. Please note, it's possible I've broken something with this rebase, so I'd be glad for testing from original author @banjaxbanjo and code review from anyone that's interested. |
Also I've taken some of the feedback @agilob provided to original PR, and integrated it within ( |
Huge thanks to both of you @smarek and @banjaxbanjo for working behind the scenes to improve that important part of our code. I'll be waiting for @banjaxbanjo's green light here to merge this next week. |
Should I squash the commits so we don't spam the repo history? |
Well I squashed them together, @banjaxbanjo thanks for testing and support in development |
Merged with PR#619 proposal, fixed up looping, buffering, cleaned up names and calls, to be more clear in code
@agilob thanks for feedback, is everything OK now? Give us please a your status, so we can merge it. |
@smarek Cheers for all the mods👍 |
Waiting for the green light to merge this stunning work. 💚 |
So is this the point were I should merge, or shall I wait? ;-) |
I think we can merge it 😈 |
So, what was done:
new Thread().sleep(500);
for-loop
incheckForSilentSms
withforeach
toString()
in context like thisDETECTION_PHONENUM_SMS_DATA[2].toString()
(where DETECTION_PHONENUM_SMS_DATA is array of Strings)Some encoding sincerely occured on-the-fly, hope you don't mind.
SmsDetector doesnt check how many bytes where read from input #615 discussion points are imho fixed by this PR
Detection of Silent SMS (part 2) #537 pointed out that the problem with performance is in string retrieval/parsing/checking, I agree and we should imho migrate the code over to regexp declarations, and I'm worried we do not now correctly handle situations on border of string stream (where detection would fail because the data are incorrectly splitted by newline character)