Skip to content

Commit c20933f

Browse files
committed
Add structure for vulnobject
1 parent 858a7bd commit c20933f

File tree

2 files changed

+59
-4
lines changed

2 files changed

+59
-4
lines changed

app/src/main/java/fuzion24/device/vulnerability/test/adapter/RecyclerAdapter.java

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,47 @@ private List<String> extractStringArray(JSONObject obj, String arrayName) throws
5555
return items;
5656
}
5757

58+
private class VulnObject {
59+
String CVEorID;
60+
String description;
61+
String impact;
62+
String CVSSV2Score;
63+
String CVEDate;
64+
String[] externalLinks;
65+
String[] altNames;
66+
String[] patches;
67+
68+
private VulnObject(String cve,
69+
String desc,
70+
String impact,
71+
String cvssv2,
72+
String cveDate,
73+
String[] externLinks,
74+
String[] altNames,
75+
String[] patches){
76+
this.CVEorID = cve;
77+
this.description = desc;
78+
this.impact = impact;
79+
this.CVSSV2Score = cvssv2;
80+
this.CVEDate = cveDate;
81+
this.externalLinks = externLinks;
82+
this.altNames = altNames;
83+
this.patches = patches;
84+
}
85+
86+
public static VulnObject getDescriptorObject(String cve,
87+
String desc,
88+
String impact,
89+
String cvssv2,
90+
String cveDate,
91+
String[] externLinks,
92+
String[] altNames,
93+
String[] patches){
94+
VulnObject vo = new VulnObject(cve, desc, impact,cvssv2,cveDate,externLinks,altNames,patches);
95+
return vo;
96+
}
97+
}
98+
5899
@Override
59100
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
60101
RecyclerItemViewHolder holder = (RecyclerItemViewHolder) viewHolder;
@@ -102,12 +143,28 @@ public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
102143

103144
if (!TextUtils.isEmpty(description)) {
104145
holder.setItemTestResultDescription(description);
105-
holder.setButtonShowDetailsClickListner(mContext, item.getCVEorID(), altNames, description, impact, externalLinks, patches, cvssV2Score, cveDate);
146+
holder.setButtonShowDetailsClickListner(mContext,
147+
item.getCVEorID(),
148+
altNames,
149+
description,
150+
impact,
151+
externalLinks,
152+
patches,
153+
cvssV2Score,
154+
cveDate);
106155
} else {
107156
holder.setItemTestResultDescription(mContext.getString(R.string.information_not_available));
108157

109158
if (jobj != null) {
110-
holder.setButtonShowDetailsClickListner(mContext, item.getCVEorID(), altNames, description, impact, externalLinks, patches, cvssV2Score, cveDate);
159+
holder.setButtonShowDetailsClickListner(mContext,
160+
item.getCVEorID(),
161+
altNames,
162+
description,
163+
impact,
164+
externalLinks,
165+
patches,
166+
cvssV2Score,
167+
cveDate);
111168
} else {
112169
holder.setButtonShowDetailsClickListner(mContext, item.getCVEorID());
113170
}

app/src/main/java/fuzion24/device/vulnerability/vulnerabilities/framework/media/CVE_2015_6608.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
1|shell@flounder_lte:/ $ grep -F "b/23881715" /system/lib64/libstagefright.so
3030
*/
3131

32-
33-
3432
public class CVE_2015_6608 implements VulnerabilityTest {
3533

3634
private static final String TAG = "CVE-2015-6608";

0 commit comments

Comments
 (0)