Commits

György Kohut committed aa266f9

use string message properties

Comments (0)

Files changed (2)

src/main/java/org/honeynet/hbbackend/hpfeeds/AttackHandler.java

 			jmsMsg.setJMSType("hpfeeds");
 			jmsMsg.setStringProperty("channel", chan);
 			jmsMsg.setStringProperty("ident", ident);
-			jmsMsg.setLongProperty("timestamp", ts);
-			jmsMsg.setLongProperty("id", attackId);
+			jmsMsg.setStringProperty("timestamp",Long.toString(ts));
+			jmsMsg.setStringProperty("id", Long.toString(attackId));
 			prod.send(jmsMsg);
 			prod.close();
 			log.debug("sending msg to new_attack | id={}", Long.toString(attackId));
 			if (binaryNew) {
 				prod = sess.createProducer(jms_new_binary);
 				jmsMsg = sess.createTextMessage();
-				jmsMsg.setLongProperty("id", binaryId);
+				jmsMsg.setStringProperty("id", Long.toString(binaryId));
 				jmsMsg.setStringProperty("md5", attack.md5);
 				prod.send(jmsMsg);
 				prod.close();

src/main/java/org/honeynet/hbbackend/virustotal/VirusTotal.java

 			while (msg == null);
 						
 			if (!stop) {
-				long binaryId = msg.getLongProperty("id");
+				long binaryId = Long.parseLong(msg.getStringProperty("id"));
 				String md5 = msg.getStringProperty("md5");
 				log.debug("received new msg | id = {} md5 = {}", binaryId, md5);