0 Members and 6 Guests are viewing this topic.
for (byte b = Byte.MIN_VALUE; b < Byte.MAX_VALUE; b++) { if (b == 0x90) { System.out.print("Joy!"); }}
Just brushing though. I will be semi active mainly came to find a HQ botnet, like THOR or just any p2p botnet
You're looping for the minimum and maximum value of a byte as defined by Java's Byte class and printing text in the event of an Intel NOP instruction. This does not occur and hence nothing is printed.
Hmmm.Well, 0x90 in decimal is equal to 144, so that's outside of the byte range (up to 127).Thus I'm assuming this is an actually integer, and to get this to work you'll either need to cast 0x90 to byte or convert the byte to an integer.
The magic number is a hex number meant to identify the file format. It is 0xCAFEBABE.Came from a combination of eating at a cafe and a band who used to play there (grateful dead) and a friend dying there. Not sure whether it was the band or the actual death but then the founder of java and friends started calling the place cafe dead. james gosling realized CAFEDEAD was a hex number and started using it for the persistent object format. Deciding on cafe as a theme, he grepped for characters that made sense with it and got CAFEBABE.Dont have next quiz if im correct, and nice question
public class Man implements java.io.Serializable { public String name; public String number; public transient int age; public boolean male; }
public class PersonInLog { public static void main(String[] args) { Man e = new Man(); e.name = "Bill"; e.number = "555-555-5555"; e.age = 30; e.male = true; try { FileOutputStream personFile = new FileOutputStream("/tmp/bill.ser"); ObjectOutputStream out = new ObjectOutputStream(personFile); out.writeObject(e); out.close(); personFile.close(); } catch (IOException e) { e.printStackTrace(); } } }
import java.io.*;public class PersonOutLog { public static void main(String[] args) { Man e = null; try { FileInputStream personFile = new FileInputStream("/tmp/bill.ser"); ObjectInputStream in = new ObjectInputStream(personFile); e = (Man) in.readObject(); in.close(); personFile.close(); } catch (IOException e) { return; } catch (ClassNotFoundException c) { return; } System.out.println("Name: " + e.name); System.out.println("Number: " + e.number); System.out.println("Age: " + e.age); System.out.println("Male: " + e.male); } }