-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Most loading but doing nothing with what it loads
- Loading branch information
Showing
15 changed files
with
520 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'optparse' | ||
require 'alienist/parser' | ||
require 'alienist/reader' | ||
|
||
debug = 0 | ||
|
||
opts = OptionParser.new do |opts| | ||
opts.banner = "Usage: alienist [options] dump_file" | ||
opts.on("-d", "--debug value", "turn on debugging") do |v| | ||
debug = v.to_i | ||
end | ||
end | ||
opts.parse!(ARGV) | ||
|
||
File.open(ARGV.shift, "rb") do |io| | ||
dump = Alienist::Parser.new Alienist::Reader.new(io, debug), debug | ||
dump.parse | ||
# p dump | ||
end |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'alienist/model/java_primitive' | ||
|
||
module Alienist | ||
class JavaBoolean < Alienist::JavaPrimitive | ||
def self.parse(reader) | ||
new reader.read_boolean | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'alienist/model/java_primitive' | ||
|
||
module Alienist | ||
class JavaByte < Alienist::JavaPrimitive | ||
def self.parse(reader) | ||
new reader.read_byte | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'alienist/model/java_primitive' | ||
|
||
module Alienist | ||
class JavaChar < Alienist::JavaPrimitive | ||
def self.parse(reader) | ||
new reader.read_char | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'alienist/model/java_primitive' | ||
|
||
module Alienist | ||
class JavaDouble < Alienist::JavaPrimitive | ||
def self.parse(reader) | ||
new reader.read_double | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Alienist | ||
class JavaField | ||
def initialize(*r) | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'alienist/model/java_primitive' | ||
|
||
module Alienist | ||
class JavaFloat < Alienist::JavaPrimitive | ||
def self.parse(reader) | ||
new reader.read_float | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'alienist/model/java_primitive' | ||
|
||
module Alienist | ||
class JavaInt < Alienist::JavaPrimitive | ||
def self.parse(reader) | ||
new reader.read_int | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'alienist/model/java_primitive' | ||
|
||
module Alienist | ||
class JavaLong < Alienist::JavaPrimitive | ||
def self.parse(reader) | ||
new reader.read_long | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Alienist | ||
class JavaObjectRef | ||
attr_reader :value | ||
|
||
def initialize(value) | ||
@value = value | ||
end | ||
|
||
def self.parse(reader) | ||
new reader.read_id | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Alienist | ||
class JavaPrimitive | ||
attr_reader :value | ||
|
||
def initialize(value) | ||
@value = value | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'alienist/model/java_primitive' | ||
|
||
module Alienist | ||
class JavaShort | ||
attr_reader :value | ||
|
||
def initialize(value) | ||
@value = value | ||
end | ||
|
||
def self.parse(reader) | ||
Alienist::JavaShort.new reader.read_short | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Alienist | ||
class JavaStatic | ||
def initialize(*r) | ||
end | ||
end | ||
end |
Oops, something went wrong.