I have gotten stuck now on my venture -
Trying to figure out how the Authorization is calculated when it comes to the communication with the Neato. Found a place in the Java-code which mentions the Authorization part but can not figure out where it comes from
com/neatorobotics/android/activities/robot/C0645j.java:~142
private void m5619R() {
if (!NeatoApplication.f2866a) {
m5646a();
try {
URI uri = new URI("ws://" + this.f3263d + ":" + this.f3264e + "/drive");
String b = C0764a.m5847b();
String str = this.f3262c.toLowerCase() + "\n" + b + "\n";
Mac instance = Mac.getInstance("HmacSha256");
instance.init(new SecretKeySpec(this.f3265f.getBytes(), "HmacSha256"));
str = C0770g.m5880a(instance.doFinal(str.getBytes("UTF-8"))).toLowerCase();
Map hashMap = new HashMap();
hashMap.put("Date", b);
hashMap.put("Authorization", "NEATOAPP " + str);
this.al = new C0655t(this, uri, new C0017f(), hashMap, 5000);
this.al.m41a();
new Thread(new C0661z(this)).start();
} catch (Exception e) {
C0767d.m5867a("ManualCleaningFragment", "Exception", e);
}
}
I have also found what String b is
com/neatorobotics/android/utils/C0764a.java:89: public static String m5847b() {
public static String m5847b() {
Calendar instance = Calendar.getInstance();
instance.add(12, (int) (((C0742a.m5809b(NeatoApplication.m5360a(), "SERVER_DEVICE_TIME_DELTA_MILLIS", 0) * -1) / 1000) / 60));
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US);
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
return simpleDateFormat.format(instance.getTime());
}
So what we need to figure out is the following variables:
this.f3262c.toLowerCase()
this.f3265f.getBytes() < I am pretty sure this is secret_key
when we crack these - we get closer to communicating with the central server