-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Hotfix #879
Open
2karuitach
wants to merge
33
commits into
develop
Choose a base branch
from
hotfix
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Hotfix #879
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
77020cc
Define the floating button at the end of the RelativeLayout,
tux-mind 8c5a9cc
version bump
tux-mind 539f982
use stable version of gradle android plugin
tux-mind d29597b
fixes #555
tux-mind 5a120d7
version bump
tux-mind f92cde5
force user to choose empty or old directories.
tux-mind cc50526
version bump
tux-mind 014b641
[ExploitFinder] fix #612
tux-mind 1144ea6
[ExploitFinder] parsed paged may return null
tux-mind 1860d4f
partially fixes #428
tux-mind cdfd4ea
fixes #429
tux-mind ccda980
fixes #437
tux-mind b157c24
display activity when dumping traffic to a pcap file.
gainan 4339b93
Update gradle to 2.8
fat-tire 70d9a70
Extract charset encoding from HTTP headers or html headers.
gainan e755957
some websites put the charset encoding names between '' characters, s…
gainan 81a014b
if we get a not valid charset, send the request with the default char…
gainan 7d983d5
parse TopLevelDomains correctly.
gainan 319d148
parse TopLevelDomains better.
gainan 9c996cb
TLD array updated with latest domains from www.publicsuffix.org
gainan f3f3c95
put the items: network, gateway and our own device, on top of the hos…
gainan a7d2bec
use Comparable interface to sort our targets.
tux-mind b986abe
improved singleton pattern
tux-mind fa3f672
make cache thread safe.
tux-mind 96de421
little speed up
tux-mind e4a12c8
update libraries, gradle, gradle plugin
fat-tire 662cbd3
version bump
tux-mind 469a574
pcap storage permission fix
asdasdasdasdasdd 47714a9
[Sniffer] use IOUtils for deal with cached files.
tux-mind 388d6cf
[Sniffer] moving a file implies it's removal...
tux-mind 41d6e3a
[ExploitFinder] Rapid7 now force to HTTPS.
tux-mind 34092c1
[ExploitFinder] follow HTTP redirects.
tux-mind 0ff1883
version bump
tux-mind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -280,6 +280,8 @@ private void onCoreBeating() { | |
} | ||
|
||
private void onCoreUpdated() { | ||
System.onCoreInstalled(); | ||
|
||
if (startCore()) { | ||
onCoreBeating(); | ||
} else if (isRootMissing) { | ||
|
@@ -612,7 +614,6 @@ public void onInputEntered(String input) { | |
@Override | ||
public void run() { | ||
System.addOrderedTarget(target); | ||
mTargetAdapter.update(null, null); | ||
} | ||
}); | ||
} else | ||
|
@@ -887,16 +888,20 @@ public View getView(int position, View convertView, ViewGroup parent) { | |
} | ||
|
||
public void clearSelection() { | ||
for (Target t : list) | ||
t.setSelected(false); | ||
synchronized (this) { | ||
for (Target t : list) | ||
t.setSelected(false); | ||
} | ||
notifyDataSetChanged(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not mandatory to use notifyDataSetChanged always. if you want to update only one item in the list then you can use notifyItemChanged(position) |
||
if (mActionMode != null) | ||
mActionMode.finish(); | ||
} | ||
|
||
public void toggleSelection(int position) { | ||
Target t = list.get(position); | ||
t.setSelected(!t.isSelected()); | ||
synchronized (this) { | ||
Target t = list.get(position); | ||
t.setSelected(!t.isSelected()); | ||
} | ||
notifyDataSetChanged(); | ||
if (mActionMode != null) { | ||
if (getSelectedCount() > 0) | ||
|
@@ -908,27 +913,34 @@ public void toggleSelection(int position) { | |
|
||
public int getSelectedCount() { | ||
int i = 0; | ||
for (Target t : list) | ||
if (t.isSelected()) | ||
i++; | ||
synchronized (this) { | ||
for (Target t : list) | ||
if (t.isSelected()) | ||
i++; | ||
} | ||
return i; | ||
} | ||
|
||
public ArrayList<Target> getSelected() { | ||
ArrayList<Target> result = new ArrayList<Target>(); | ||
for (Target t : list) | ||
if (t.isSelected()) | ||
result.add(t); | ||
synchronized (this) { | ||
for (Target t : list) | ||
if (t.isSelected()) | ||
result.add(t); | ||
} | ||
return result; | ||
} | ||
|
||
public int[] getSelectedPositions() { | ||
int[] res = new int[getSelectedCount()]; | ||
int[] res; | ||
int j = 0; | ||
|
||
for (int i = 0; i < list.size(); i++) | ||
if (list.get(i).isSelected()) | ||
res[j++] = i; | ||
synchronized (this) { | ||
res = new int[getSelectedCount()]; | ||
for (int i = 0; i < list.size(); i++) | ||
if (list.get(i).isSelected()) | ||
res[j++] = i; | ||
} | ||
return res; | ||
} | ||
|
||
|
@@ -948,21 +960,27 @@ public void update(Observable observable, Object data) { | |
public void run() { | ||
if(lv == null) | ||
return; | ||
int start = lv.getFirstVisiblePosition(); | ||
for(int i=start, j=lv.getLastVisiblePosition();i<=j;i++) | ||
if(target==list.get(i)){ | ||
View view = lv.getChildAt(i-start); | ||
getView(i, view, lv); | ||
break; | ||
} | ||
|
||
synchronized (this) { | ||
int start = lv.getFirstVisiblePosition(); | ||
int end = Math.min(lv.getLastVisiblePosition(), list.size()); | ||
for (int i = start; i <= end; i++) | ||
if (target == list.get(i)) { | ||
View view = lv.getChildAt(i - start); | ||
getView(i, view, lv); | ||
break; | ||
} | ||
} | ||
} | ||
}); | ||
|
||
} | ||
|
||
@Override | ||
public void run() { | ||
list = System.getTargets(); | ||
synchronized (this) { | ||
list = System.getTargets(); | ||
} | ||
notifyDataSetChanged(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always use curly braces
for (Target t : list){
t.setSelected(false);
}