jsobfu 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/bin/jsobfu +8 -0
  3. data/lib/jsobfu.rb +2 -2
  4. metadata +18 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmUxZDBhNjdkODI2MTY1N2QxMjQzNmNiOGExYTBlODA0NzEwZmNhMQ==
4
+ ODI3NGYzZmNkMmU4ZmZmM2M1NzIwMjZjNzBhZDQ0YjhjNzVkYmI4MA==
5
5
  data.tar.gz: !binary |-
6
- OGNlMzY5NGRhOTJlYmY0NTMzNTg4MzI4NzhlMjg4OGQ4MmVlODRkOQ==
6
+ ZjgxMWE0MDFkZGY1YzFlZmFkYTM0ODE2MzJkMWUxZmUxZjZjZGFlNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDI1ODA1ODRhOWY3ZTNiZjU0MDc4ZDkyY2VlZmM3ZWM2MmQ3YTUwMmM4MmQz
10
- ZjM5NDc3ODc2MTJmZDRjZTQzN2Q5NmQ3ZDZhMTc4ZGJlOGQ3NTQzM2JmNzUz
11
- Y2M3NDkyZDI5M2I5OGRkYjMzZGVhZTlhODg5ODIwYzhmZTZkMDU=
9
+ Yjg0Nzc2MzcyZmUzZWEwNTVjNmYyYmFkMGFmOGM0ODRhNmM3MGVmODUzMjIy
10
+ YWRjOTdjNzZiZDFjM2VjZGI2ZDIxNTU4ZWRmN2QxZTEyM2I3NjYxMjI4ODMx
11
+ MjdlNTg2Y2U1ZDJmNTVlYTQ1MGExM2Q4NjZlNTViNTE3MDZmNDg=
12
12
  data.tar.gz: !binary |-
13
- YjJmMzA2ODMzMWI0YTYzMTNmMmVlMmZlNTNjY2E1YTE3YWQxZDYwMDM3MjQy
14
- NWYxZjNkYjFhYTBhZmNlMzE0YjAxMTQ5ZTliNzQ1NTRlODYxNGRlNzliMWJh
15
- YzY1YjdmOTE1NTJiNTBhMjlmZTI3ODYwNTVhOTMyYzVhYTU4ZGU=
13
+ MjUwZmQ4N2UyYmQwZWFmZGEwYmIxMjdkMTljMWIyY2Q4MGJkZmE0YzM0ODhh
14
+ NDJkOTYwZjYyZGU5NDdmYzg2Mzc2NTFmNjlmZDNmMmMxNzRkYTEyN2IyOTkz
15
+ NDRiNmU1ODgxMWFkZGFmM2Q2ZmIxOWFmMDMzOWZmMDk4NzFlMTE=
data/bin/jsobfu ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ require 'jsobfu'
3
+
4
+ iterations = (ARGV[0] || 1).to_i
5
+
6
+ js = JSObfu.new(STDIN.read)
7
+
8
+ puts js.obfuscate(iterations: iterations)
data/lib/jsobfu.rb CHANGED
@@ -47,7 +47,7 @@ class JSObfu
47
47
  # the output code (true)
48
48
  # @option opts [Integer] :iterations number of times to run the
49
49
  # obfuscator on this code (1)
50
- # @return [String] if successful
50
+ # @return [self]
51
51
  def obfuscate(opts={})
52
52
  return self if JSObfu.disabled?
53
53
 
@@ -85,7 +85,7 @@ class JSObfu
85
85
 
86
86
  # Returns the obfuscated name for the variable or function +sym+
87
87
  #
88
- # @param [String] sym the name of the variable or function
88
+ # @param sym [String] the name of the variable or function
89
89
  # @return [String] the obfuscated name
90
90
  def sym(sym)
91
91
  return sym.to_s if @renames.nil?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsobfu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Lee
@@ -81,12 +81,28 @@ dependencies:
81
81
  - - ! '>='
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: yard
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
84
98
  description:
85
99
  email: joev@metasploit.com
86
- executables: []
100
+ executables:
101
+ - jsobfu
87
102
  extensions: []
88
103
  extra_rdoc_files: []
89
104
  files:
105
+ - bin/jsobfu
90
106
  - lib/jsobfu.rb
91
107
  - lib/jsobfu/disable.rb
92
108
  - lib/jsobfu/ecma_tight.rb