sinn3r
68a50e3663
Land #3224 - Fixes large-string expansion in JSObfu
2014-04-10 12:09:22 -05:00
Joe Vennix
14fed8c610
Fixes large-string expansion in JSObfu.
2014-04-09 15:45:48 -05:00
William Vu
9779913060
Land #3184 , Rex::Proto::Http::Client IOError fix
2014-04-03 15:58:50 -05:00
joev
3504ddc633
Fix http spec.
2014-04-03 14:50:54 -05:00
William Vu
92c6113a7c
Fix broken spec for Rex::Text.randomize_space
2014-04-02 11:48:50 -05:00
Tod Beardsley
8ab03f3aeb
Use Array#sample in randomize_space
2014-04-01 14:09:07 -05:00
Tod Beardsley
ec7bb6de54
Land #2969 , random name generator for phishing
2014-04-01 13:00:55 -05:00
William Vu
355cda0a43
Add specs for random name and e-mail methods
...
Babby's first RSpec. Style is consistent with the rest of the tests.
2014-03-28 16:47:52 -05:00
sinn3r
b431bf3da9
Land #3052 - Fix nil error in BES
2014-03-11 12:51:03 -05:00
Joe Vennix
5790547d34
Start undoing some work.
2014-03-04 17:01:53 -06:00
Joe Vennix
2a87973d3c
Use be instead of eq.
2014-03-03 21:55:12 -06:00
Joe Vennix
a382b78f80
Oops, $ and _ need to be in the spec.
...
* Repeats the random check 20 times for each spec.
2014-03-03 21:54:09 -06:00
Joe Vennix
bfecf9525d
Add Rex::RandomIdentifierGenerator.
2014-03-03 16:43:49 -06:00
Joe Vennix
e8b10db73b
Dropped a space.
2014-03-03 15:48:44 -06:00
Joe Vennix
1352e5eacb
Add presence spec.
2014-03-03 15:47:30 -06:00
Joe Vennix
b3ab8f7ce1
Make random_var_name public, add specs for it.
2014-03-03 15:39:56 -06:00
Joe Vennix
6574a06bc3
Whitespace fix.
2014-03-02 20:55:07 -06:00
Joe Vennix
4514e32df8
Remove spec changes, oops.
2014-03-02 20:54:22 -06:00
Joe Vennix
b458b8ad63
Add specs for new methods.
2014-03-02 20:23:20 -06:00
William Vu
0a3ee573bc
Uncomment spec_helper require
2014-01-22 11:58:10 -06:00
William Vu
2b7a993f65
Land #2902 , updated PJL spec
2014-01-22 11:57:28 -06:00
Tod Beardsley
90207628cc
Land #2666 , SSLCompression option
...
[SeeRM #823 ], where Stephen was asking for SSL compression for
Meterpreter -- this isn't that, but it's at least now possible for other
Metasploit functionality.
2014-01-22 10:42:13 -06:00
sinn3r
1c1597973e
Update PJL rspec to comply with guidelines
...
Basically the updated version is more explicit. If a moethod doesn't
return anything but might raise an error, then we focus on that.
Also use . to # for instance methods.
2014-01-22 03:34:49 -06:00
sinn3r
a1eba03d1f
Land #2725 - Rex::Proto::PJL plus modules
2014-01-16 15:57:38 -06:00
William Vu
6110ad72b3
Update tests and ensure full coverage
2014-01-16 15:11:04 -06:00
sinn3r
7b206d6094
Ensure full coverage
2014-01-12 23:10:47 -06:00
sinn3r
f9fc54980a
retab
2014-01-12 22:54:43 -06:00
sinn3r
b8dd4b08c8
Add rspec
2014-01-12 22:53:11 -06:00
William Vu
b43a221959
Land #2855 , Rex::Socket refactor and specs
2014-01-09 16:20:50 -06:00
James Lee
442c98bc05
Add spec for fixed bug
2014-01-09 15:18:03 -06:00
James Lee
1519af33f5
Refactor `getaddress` in terms of `getaddresses`
2014-01-09 11:03:24 -06:00
James Lee
01f350964f
Add specs for some stuff in Rex::Socket
2014-01-09 10:19:19 -06:00
James Lee
cc51c2033e
Fix unreliable spec
...
Sometimes "localhost" resolves to more than one address
2014-01-08 10:16:32 -06:00
James Lee
9c23910b69
Refactor Socket::Range
...
There was really no reason for it to inherit from Array. Also adds a few
more specs and gets coverage up to a more respectable percentage.
2014-01-07 16:31:55 -06:00
James Lee
2ed9772080
Fix unhandled exceptions when resolution fails
2014-01-07 12:00:04 -06:00
James Lee
a6b25d3323
Add failing spec for invalid hostname bug
2014-01-06 17:49:27 -06:00
Joe Vennix
3ff9da5643
Remove compression options from client sockets.
...
I couldn't verify that it was working, as it always sends 1 compression type of NULL.
2013-11-20 14:41:45 -06:00
Joe Vennix
f8b57d45cd
Reenable the client SSLCompression advanced option.
...
Add spec for some of the additions to Rex::Proto::Http::Client
2013-11-20 01:03:13 -06:00
sinn3r
991240a87e
Support java version detection
2013-11-07 00:54:52 -06:00
sinn3r
73e72a6488
Update the detect_spec testcase
2013-11-05 01:14:12 -06:00
joev
7d975dfa87
Fix spec to refer to postInfo().
2013-11-02 16:54:22 -05:00
joev
90d8da6a21
Fix some bugs in my edits, add a spec.
2013-11-02 16:46:33 -05:00
sinn3r
afcce8a511
Merge osdetect and addonsdetect
2013-10-22 01:11:11 -05:00
sinn3r
135648c171
Add the new rspec files
2013-10-21 20:18:36 -05:00
sinn3r
9a3e719233
Rework the naming style
2013-10-21 20:16:37 -05:00
sinn3r
5280bcf3f8
Update rspec files
...
Remove some junk code
2013-10-21 17:13:01 -05:00
sinn3r
8a94df7dcd
Change category name for base64
2013-10-18 21:20:16 -05:00
sinn3r
73b8eb0f83
Add rspec files to make sure the javascript files are loadable.
2013-10-18 15:14:26 -05:00
jvazquez-r7
8b7d241dc3
Use a named subject
2013-10-07 12:28:50 -05:00
jvazquez-r7
d8dba8ee58
Fix ropdb spec according to @limhoff-r7's comments
2013-10-07 09:51:21 -05:00
sinn3r
41e87d83a6
Add rspec for Rex::Exploitation::RopDb
2013-10-04 00:54:07 -05:00
Tab Assassin
2e8d19edcf
Retab all the things (except external/)
2013-09-30 13:47:53 -05:00
Tod Beardsley
7cc2ad55a6
Land #1770 , unattend.xml snarfing modules
2013-09-27 16:04:38 -05:00
Tabassassin
120cca8bb3
Retab unattended_spec to avoid conflicts
2013-09-27 13:44:33 -05:00
Tod Beardsley
5bab85fcda
Use a context for #parse
2013-09-27 13:04:18 -05:00
Tod Beardsley
6345fb2788
Use described_class
2013-09-27 12:59:10 -05:00
Tod Beardsley
7d9d98c9eb
Land #2421 , update to cookie parsing specs
2013-09-27 11:45:33 -05:00
Tod Beardsley
8f957a5394
Add spec for new #to_h method
2013-09-27 11:27:31 -05:00
Tod Beardsley
103a64a32a
Indent like a sane person.
2013-09-27 10:22:46 -05:00
Tod Beardsley
623aeb367f
Set a context for #get_cookies
2013-09-27 10:12:11 -05:00
Tod Beardsley
467c503fb9
DRY with a cookie_sanity_check method
2013-09-27 10:07:28 -05:00
Tod Beardsley
5e95df1370
Convert local variables to HEREDOC methods
2013-09-27 10:02:22 -05:00
Tod Beardsley
57862125b9
Use shuffle and *splat operator to test arrays
...
Also, move the local variables to inside the describe block to avoid any
future scope issues.
2013-09-27 09:53:04 -05:00
Tod Beardsley
0aa2556dfc
Use described_class, not a new constant
2013-09-27 09:32:15 -05:00
FireFart
3d28003285
updated get_cookies rspecs
2013-09-25 22:56:13 +02:00
Brandon Turner
4760000bca
Replace mock with double in specs
...
mock is deprecated - https://www.relishapp.com/rspec/rspec-mocks/docs
2013-09-06 09:34:05 -05:00
Tab Assassin
269c1a26cb
Merge for retab
2013-09-05 14:57:32 -05:00
William Vu
d493346691
Land #2137 , fixes and specs for Opt containers
2013-07-23 15:58:09 -05:00
William Vu
86ab942435
Land #2146 , Unix and Windows path normalization
2013-07-23 15:23:41 -05:00
sinn3r
8b0aac2d3c
Add another test case for having a trailing slash for unix path
...
If a trailing path exists in the original input, should keep it.
This test case should verify that.
2013-07-22 23:23:40 -05:00
sinn3r
2be0b84ba8
Not Windows format, Unix.
2013-07-22 22:37:36 -05:00
sinn3r
4ea176b5ee
Add another test case
2013-07-22 22:35:19 -05:00
sinn3r
958a4edd73
Keep the trailing slash if the user wishes
2013-07-22 20:46:18 -05:00
sinn3r
359009583f
Drop support for UNC path parsing in normalize_win_path
...
Not really a good idea to try to parse UNC format. Confuses the
purpose of the function.
2013-07-22 20:20:45 -05:00
sinn3r
8656fcf5e0
Update the test description a little better
2013-07-22 19:35:52 -05:00
sinn3r
4b3fce9349
Add functions to normalize Winodws & Unix paths
...
The purpose of these functions is to be able to join file/dir paths
safely without trailing slashes, basically for the same reason as
normalize_uri. Some modules are really buggy when merging paths,
so instead of letting them do it, it's better to use these functions.
2013-07-22 19:26:04 -05:00
David Maloney
ec82644bd3
mo fixes mo specs
...
SEERM #7536
SEERM #7537
2013-07-18 15:00:57 -05:00
James Lee
273046d8f0
Add a class for generating random identifiers
...
Will be useful for all kinds of things, but brought about in discussions
specifically for Util::EXE in #2037 .
2013-07-09 02:06:44 -05:00
James Lee
5955397882
Use a more descriptive subject
...
Also removes the unnecessary (and now broken in 2.0) checks for
respond_to? on accessors.
2013-06-07 13:27:40 -05:00
James Lee
0f2ea755c5
Add encoding comment to spec files for 2.0 compat
2013-06-07 13:27:39 -05:00
sinn3r
1d9a695d2b
Landing #1772 - Adds phpMyadmin Preg_Replace module (CVE-2013-3238)
...
[Closes #1772 ]
2013-04-28 12:17:16 -05:00
Meatballs
de5c856188
get_cookies spec
2013-04-26 21:21:11 +01:00
James Lee
a12dbbaee7
Use :each instead of :all here, too
2013-04-26 11:49:30 -05:00
Meatballs
590b8a3e26
Added rspec
2013-04-26 00:50:29 +01:00
James Lee
1ec6884bfa
Use before(:each) instead of :all
...
Fixes deprecation warnings in newer rspec like these
WARNING: subject accessed in a `before(:all)` hook at:
/metasploit-framework/spec/lib/rex/post/meterpreter/packet_spec.rb:455:in `block (3 levels) in <top (required)>'
This is deprecated behavior that will not be supported in RSpec 3.
Also switches to using named subjects for easier reading.
2013-04-25 10:28:30 -05:00
James Lee
93bddd9041
Improved docs and partial specs for Rex::Text
...
Conflicts:
lib/msf/core/modules/loader/base.rb
lib/rex/poly/block.rb
lib/rex/text.rb
2013-04-23 17:24:03 -05:00
James Lee
f321cea4cd
Slightly more readable assertion
2013-03-07 14:45:58 -06:00
James Lee
8abcc5a1d4
Whitespace
2013-03-07 14:34:44 -06:00
David Maloney
7332d31523
fix some style things for egypt
2013-03-07 11:11:48 -06:00
David Maloney
6eb334c925
a little more coverage
2013-03-05 00:01:09 -06:00
David Maloney
d909c00036
better spec coverage
2013-03-04 23:43:18 -06:00
David Maloney
3a72fa4ea0
address sslv2 issues in specs
...
the ubuntu sslv2 thing caused all kinds of issues with rspec
handling this by expecting those exceptions properly or doing away
with sslv2 where it isn't needed in the examples
2013-03-04 21:45:44 -06:00
David Maloney
3bb1b2b368
attempt to deal with specs
2013-03-04 19:25:20 -06:00
David Maloney
dc7c02e9e8
still trying to get around this sslv2 thing
2013-03-04 18:18:01 -06:00
David Maloney
246977e0cf
Address openssl sslv2 issues
...
Debian/Ubuntu ship openssl without sslv2 compiled in.
we now check for this ahead of time
2013-03-04 17:39:28 -06:00
David Maloney
13ad5cf150
Merge branch 'master' into feature/ssl/add_cipher_support
2013-03-04 15:07:32 -06:00
James Lee
cb18b81503
Add spec to ensure auth is sane
2013-03-04 11:59:30 -06:00
David Maloney
4212c36566
Fix up basic auth madness
2013-03-01 11:59:02 -06:00
James Lee
5a79fcd11e
Ensure we build only one Authorization header
...
Also fixes an issue where Host headers were generated with nil by
preferring the vhost from Client instead of the default nil from
ClientRequest.
2013-02-28 13:47:30 -06:00
James Lee
425c245771
Axe set_cgi in favor of set_uri
...
They were identical except for a couple of extra bugs in set_cgi.
Also changes ```split("/")``` to ```split("/", -1)```, which behaves
correctly when the input has a seperator at the beginning or end.
2013-02-27 19:13:05 -06:00
James Lee
16bba7a6ac
Add test for pad_get_params
2013-02-27 18:06:55 -06:00
James Lee
4edd46216f
Refactor config -> opts
...
Puts all the evasion stuff in the same place as regular HTTP options to
make it easier to deal with.
2013-02-27 17:29:26 -06:00
James Lee
5606db3f9c
Re-enable some commented tests
2013-02-27 16:28:17 -06:00
James Lee
29df20996e
Move most of the configuration into ClientRequest
...
Also fixes in-place modification of the query string which resulted in
duplication of the GET parameters when calling #to_s more than once.
2013-02-26 17:38:09 -06:00
James Lee
935304ee0c
No longer pending
2013-02-26 16:36:36 -06:00
James Lee
93537de68c
Use let and subject blocks for better readability
2013-02-26 16:27:32 -06:00
James Lee
579c11bc69
Set reasonable defaults for more things
...
All current tests are passing now
2013-02-26 14:25:46 -06:00
James Lee
c206ac4998
Set some reasonable defaults
...
Fixes a number of nil deref issues
2013-02-26 14:15:51 -06:00
James Lee
7b3a11f2f9
Axe tests that belong in client_request_spec
2013-02-26 13:28:44 -06:00
James Lee
cae030ccd7
Whitespace
2013-02-26 13:25:37 -06:00
James Lee
5ac20e1b02
Merge branch 'feature/http/authv2' of git://github.com/dmaloney-r7/metasploit-framework into dmaloney-r7-feature/http/authv2
...
Conflicts:
lib/rex/proto/http/client.rb
2013-02-26 12:08:00 -06:00
David Maloney
c104fa6d97
Add spec and a few fixes for set_uri
2013-02-26 11:01:16 -06:00
James Lee
1ce86b7adb
Whitespace
2013-02-25 14:29:10 -06:00
James Lee
904a69ba63
Move xor tests to the right filenames
...
Thanks, simplecov, for telling me that these weren't actually getting
run.
2013-02-25 13:02:03 -06:00
Tod Beardsley
73f6314373
Moving @cli and @ip to instance vars
2013-02-25 08:29:08 -06:00
Tod Beardsley
caed599f7d
Backed out all the fails from the auth bits
2013-02-25 08:26:02 -06:00
Tod Beardsley
6e35813d69
Pending hashes need to end w a block
2013-02-25 08:20:46 -06:00
James Lee
4a84528ecf
Move pending messages to it()'s args
2013-02-20 15:02:12 -06:00
Tod Beardsley
5a0744934e
Let's not intro functionality as testing
...
That's a bad habit to get into.
2013-02-11 21:06:52 -06:00
Tod Beardsley
ba7f5a7245
Actually run this spec.
2013-02-11 21:04:57 -06:00
Tod Beardsley
039fd2b885
Adds some light testing for Rex's HTTP client lib
...
In light ofi PR #1476 , it would be nice to have some basic, modern,
maintained testing on Rex's HTTP Client proto library.
My rspec fu is quite weak, of course, but this should cover the very
basic cases. There are lots of pending holes, but hey, it's a start.
2013-02-11 15:54:40 -06:00
David Maloney
949eb08062
In the final stages
2013-02-11 09:59:39 -06:00
David Maloney
0f9b16d07f
Scanner class finished, result needs more work
...
the result class needs a nice clean to_s method to print easily readable
output. mostly working now. a few more tweaks needed.
2013-02-09 19:06:17 -06:00
David Maloney
c25d4b4863
Test Cipher method underway
...
Trying to get a clever test plan under way to actually test the network
side of this. Not quite working yet
2013-02-09 01:07:56 -06:00
David Maloney
38d0a244fd
Beginings of the actual scanner
...
configuration and configuration validation in place with tests.
2013-02-09 00:03:58 -06:00
David Maloney
ccf18d6cb7
Finalize specsfor Result class
2013-02-08 17:20:04 -06:00
David Maloney
3295157f78
More support for various checks
2013-02-08 13:25:49 -06:00
David Maloney
dfc7ce9381
fix stupid datat structure
...
also supports a boolean value for whether the cipher is weak or not
2013-02-08 11:33:36 -06:00
David Maloney
5c9f946927
empty shells for the scanner and its specs
2013-02-07 16:16:41 -06:00
David Maloney
096360261e
De-dup cipher results
2013-02-07 16:09:47 -06:00
David Maloney
4e87bf4ab3
Add enumeration and support options
...
i lied, there's more. Adds two enumerators and methods to check for
specific ssl version support as well as a quick method to tell if the
server supports ssl at all.
2013-02-07 15:51:07 -06:00
David Maloney
10e017ae73
finish up the SSLScan::Result class
...
finishes up result class for SSLScan , compelte with tests
2013-02-07 14:56:26 -06:00
David Maloney
7036365e04
Start adding sslscan results object
...
Building out the result object for the SSlScan
2013-02-07 12:42:18 -06:00
James Lee
2ee0c0d8fb
Add simple specs for Rex::Encoding::Xor*
2013-01-15 16:59:01 -06:00
Tod Beardsley
f6478678ce
trailing whitespace
2012-12-27 23:08:50 -06:00
David Maloney
ee6db8794e
Basic specs for meterpreter packet parser
2012-12-27 17:19:37 -06:00
David Maloney
74e543ec5a
add spec skeleton for packet parser
2012-12-27 14:23:05 -06:00
David Maloney
aaa8716f5b
minor cleanup as per egypt
2012-12-12 10:12:42 -06:00
David Maloney
c952ed0f87
Add test for raw format of packets
2012-12-07 12:51:53 -06:00
David Maloney
b707f8d13a
Packet specs now complete
...
82 tests for the packet lib
2012-12-07 12:32:34 -06:00
David Maloney
89c98ebd39
Finished tests for GroupTlv ftmp
2012-12-06 17:59:07 -06:00
David Maloney
468f637efe
basics for adding tlvs to GroupTlv
2012-12-05 18:19:12 -06:00
David Maloney
5dcf573063
TLV tests down, on to GroupTlv
2012-12-05 17:55:28 -06:00
David Maloney
391ff5bbb0
basic TLV method tests
2012-12-05 15:44:03 -06:00
David Maloney
b18f5b1875
Start with the duh stuff, responds_to
2012-12-05 14:39:29 -06:00
Luke Imhoff
055f95898d
Merge branch 'master' into bug/wrong-file_changed-argument
...
Conflicts:
lib/msf/core/modules/loader/base.rb
2012-10-24 15:25:49 -05:00