Commit Graph

231 Commits

Author SHA1 Message Date
Tod Beardsley 63934fc368 Adding another test file (ignore)
[Closes #356]
2012-05-01 16:03:52 -05:00
Fakey McFakepants 7e969a9849 Adding a new file to test/git.txt 2012-05-01 15:42:47 -05:00
Tod Beardsley 4cdef9ab4c Adding a file to the Git Repo (ignore)
This file will be edited a few times then removed. It is here just for
GitHub user training for metasploit developers.
2012-05-01 13:14:06 -05:00
James Lee 64f8665df0 Remove loads 2012-03-28 14:33:24 -06:00
James Lee 0e472deede Add a simple test for unix shells 2012-03-28 14:33:24 -06:00
James Lee f797bb5d1b Convert railgun tests to ModuleTest API 2012-03-28 14:33:24 -06:00
James Lee 3abb45672d Convert registry tests to ModuleTest API 2012-03-28 14:33:24 -06:00
James Lee 5821a70b16 Add exception logging for test failures 2012-03-28 14:33:24 -06:00
James Lee 926c11139e Don't write out debugging junk 2012-03-23 15:33:28 -06:00
James Lee 5da33c4bf1 Add some verbosity for explaining why a read failed 2012-03-23 15:31:36 -06:00
James Lee 8265fc4b82 Clarify that we're looking at sniffer ifaces 2012-03-19 15:04:40 -06:00
James Lee d25756976c Add a binary-safe method for writing files on unix shell sessions
Also some tests for doing so, all of which pass on Linux, Windows, and
Java meterpreter, as well as shell sessions on Linux and Solaris. They
will fail miserably on Windows shell sessions.
2012-03-19 01:10:23 -06:00
James Lee 49217a28ec Add pending tests for binary and large files 2012-03-17 11:05:16 -06:00
James Lee 4b73f75a49 Make sure the file was actually written as expected 2012-03-16 17:20:24 -06:00
James Lee c1eca01849 Cleanup the file created during testing 2012-03-16 17:03:22 -06:00
James Lee 103ecd3acc Make the test for file existence platform agnostic 2012-03-16 16:39:29 -06:00
James Lee 47ce05cc27 Add a couple methods and some tests for Post::File 2012-03-16 16:27:06 -06:00
James Lee c44c0ebf48 Refactor ModuleTest and add a few more tests
This makes running tests from a post module as easy as creating methods
that start with +test_+ and running +it()+ blocks inside them.
2012-03-02 17:56:40 -07:00
James Lee a02ab0ab0c Add a few more tests for meterpreter 2012-03-02 15:31:01 -07:00
James Lee 3c4c500544 Add a few more meterpreter API tests 2012-03-01 19:21:34 -07:00
James Lee 9bac806cdb Add some simple meterpreter API tests 2012-03-01 16:30:37 -07:00
Tod Beardsley 31dea3844e Reintroduces chao-mu's OptRegexp
Revert "Revert "Merge pull request #101 from chao-mu/master""

[See #101]

This reverts commit c5ce575543.
2012-01-23 14:21:19 -06:00
Tod Beardsley c5ce575543 Revert "Merge pull request #101 from chao-mu/master"
Reverting the OptRegexp commit from chao-mu. Before committing to
master, this option type needs to be tested on the various mainstream
UI's (Metasploit Pro, msfgui, and Armitage) to see if they behave
as reasonably as msfconsole. Each UI tends to handle option setting,
passing, and display in their own special way.

This should make it back in by Wednesday, assuming all goes well.

[See #101]

This reverts commit 84db5a21fc, reversing
changes made to 24aaf85a1b.
2012-01-17 15:33:47 -06:00
chao-mu a8a3d4d2c7 Updatted railgun_reverse_lookups test module to use the new regex options. Corrected spelling mistake in a variable name (my editor ate a p) 2012-01-12 19:39:05 -05:00
James Lee 4cd329a943 Spawn the payload as a seperate process
Running the payload using system() in a thread was causing some weird
interactions with ctrl-c. Fix those issues by using Process.spawn and
Process.detach. I suspect this was the original cause of #3631, java
meterpreter sessions dying unaccountably.

See #3631
2011-12-31 12:11:34 -07:00
Joshua Smith 9ab5becb63 a better test post mod (test/modules/post/test/railgun_reverse_lookups.rb), should have been in previous commit 2011-12-18 00:36:29 -05:00
Joshua Smith 8bdf76a87b Adds const_reverse_lookup and error_lookup methods to the railgun instance, also adds test/modules/post/test/railgun_reverse_lookups.rb, tested, working great 2011-12-17 16:19:32 -05:00
James Lee 58880d3457 add a module for testing services, update some tests for registry, cleanup some comments for rdoc compat, and add a ParseError exception class. see #3745
git-svn-id: file:///home/svn/framework3/trunk@13739 4d416f70-5f16-0410-b530-b9f4589650da
2011-09-16 20:32:22 +00:00
Tod Beardsley c54e18d757 Fixes #5038. Removes all instances of Racket objects, as far as I can tell. If I missed any through my mighty grep -ril racket . statement, please reopen!
git-svn-id: file:///home/svn/framework3/trunk@13342 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-26 01:29:21 +00:00
Carlos Perez 68e3691411 Change Post Mixin for Windows platform in its own separate class and minor fixes on modules and scripts
git-svn-id: file:///home/svn/framework3/trunk@12990 4d416f70-5f16-0410-b530-b9f4589650da
2011-06-21 00:38:04 +00:00
James Lee 7a45ce0616 get rid of some warnings on 1.8
git-svn-id: file:///home/svn/framework3/trunk@12489 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-01 20:23:25 +00:00
Jonathan Cran 0d2cc7472b teensy bit more work on the spec for msfconsole. this commit merges in a meterpreter functional test.
git-svn-id: file:///home/svn/framework3/trunk@12370 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-19 16:40:50 +00:00
Jonathan Cran d45b2aaa20 bugfix & cleanup of the vm loading and a speedup / bugfix for the regex lib
git-svn-id: file:///home/svn/framework3/trunk@12032 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-20 02:33:39 +00:00
Jonathan Cran e1b48c3f81 call ruby directly
git-svn-id: file:///home/svn/framework3/trunk@11913 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-09 03:39:28 +00:00
Jonathan Cran 827534e1b6 fixup the matchers
git-svn-id: file:///home/svn/framework3/trunk@11911 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-09 03:20:58 +00:00
Jonathan Cran 1de316c386 updated meterpreter functional tests
git-svn-id: file:///home/svn/framework3/trunk@11909 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-09 03:04:12 +00:00
James Lee 15c6e90e2e fix some whitespace and be more angry when something is broken
git-svn-id: file:///home/svn/framework3/trunk@11789 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-22 02:02:04 +00:00
James Lee 50614260f1 remove superfluous stuff from the test module, fix an ArgumentError in the mixin. see r11783 and r11784
git-svn-id: file:///home/svn/framework3/trunk@11785 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-21 19:22:19 +00:00
James Lee 72ffa260c2 add a test module for registry usage
git-svn-id: file:///home/svn/framework3/trunk@11783 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-21 19:06:20 +00:00
Jonathan Cran 5bb3a16e7a updated matchers
git-svn-id: file:///home/svn/framework3/trunk@11741 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-11 00:48:34 +00:00
Jonathan Cran 2b0854dc1b updated to use msf matchers
git-svn-id: file:///home/svn/framework3/trunk@11740 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-11 00:48:06 +00:00
Jonathan Cran 2ff36a624d work around meterpreter input bug for now
git-svn-id: file:///home/svn/framework3/trunk@11736 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-09 21:13:29 +00:00
Jonathan Cran 1cff86a870 background the session
git-svn-id: file:///home/svn/framework3/trunk@11734 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-09 10:26:53 +00:00
Jonathan Cran 160865eee6 minor changes
git-svn-id: file:///home/svn/framework3/trunk@11733 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-09 10:23:13 +00:00
Jonathan Cran 57d56b7e94 updated for new rspec matchers
git-svn-id: file:///home/svn/framework3/trunk@11710 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-04 09:16:20 +00:00
Jonathan Cran f90ec308c6 updated matchers
git-svn-id: file:///home/svn/framework3/trunk@11688 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-31 17:48:03 +00:00
Jonathan Cran 9a96aed4e7 psexec test, rename http 100_continue test
git-svn-id: file:///home/svn/framework3/trunk@11675 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-30 01:39:25 +00:00
Jonathan Cran f3081a226a msfconsole functional testing spec
git-svn-id: file:///home/svn/framework3/trunk@11674 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-30 00:04:55 +00:00
Jonathan Cran bfd2410c6d make it simpler to pull out failure cases when regexing logs. also, add some rspec matchers, and get rid of the (now useless) thin ut layer on top of regexr.
git-svn-id: file:///home/svn/framework3/trunk@11673 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-29 21:40:53 +00:00
Jonathan Cran 7e86b433b1 add debug
git-svn-id: file:///home/svn/framework3/trunk@11521 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-08 08:45:30 +00:00
Jonathan Cran 81ce82c8ee add a php spec
git-svn-id: file:///home/svn/framework3/trunk@11509 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-07 20:17:32 +00:00
Jonathan Cran 252832c1e1 updated meterpreter specs
git-svn-id: file:///home/svn/framework3/trunk@11491 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-06 20:48:56 +00:00
Jonathan Cran 49c601c11b cleanup, added a test to run all commands
git-svn-id: file:///home/svn/framework3/trunk@11489 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-06 19:07:24 +00:00
Jonathan Cran bc680edd81 initial set of specs for meterpreter:
these specs set up a session, run commands, and regex output to see that the correct text is returned from meterpreter. 

usage: spec meterpreter_win32_spec.rb




git-svn-id: file:///home/svn/framework3/trunk@11488 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-06 18:26:14 +00:00
Jonathan Cran 41732344f0 updated test / regex library
git-svn-id: file:///home/svn/framework3/trunk@11475 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-05 04:31:45 +00:00
Jonathan Cran 45efaa2088 small changes, making testing of msfconsole output easier
git-svn-id: file:///home/svn/framework3/trunk@11435 4d416f70-5f16-0410-b530-b9f4589650da
2010-12-28 19:50:44 +00:00
James Lee 3d52c5c4c0 add target info for generic so reloading gets correct compatible payloads
git-svn-id: file:///home/svn/framework3/trunk@11354 4d416f70-5f16-0410-b530-b9f4589650da
2010-12-16 20:18:06 +00:00
Joshua Drake f687a3460c move all test modules (aux/exploits) into test/modules directory, use loadpath to load them
git-svn-id: file:///home/svn/framework3/trunk@11218 4d416f70-5f16-0410-b530-b9f4589650da
2010-12-04 01:59:24 +00:00
Jonathan Cran 8fbb01a93f updated regex / test lib
git-svn-id: file:///home/svn/framework3/trunk@11002 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-12 03:13:05 +00:00
Jonathan Cran 54d659493d updated msf test libraries
git-svn-id: file:///home/svn/framework3/trunk@10827 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-26 06:05:24 +00:00
Jonathan Cran 48af4d63c1 updated msftest assert functions and fixed a few bugs in the associated library
git-svn-id: file:///home/svn/framework3/trunk@10634 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-11 01:57:33 +00:00
Jonathan Cran 18ef827e7f Split the unit testing and log regexing capabilities - this should make it easier to regex msf logs for failure / success if you're doing automated testing with the framework.
git-svn-id: file:///home/svn/framework3/trunk@10628 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-10 01:55:50 +00:00
Jonathan Cran 8737c7ddfd updated regex methods. i write buggy code.
git-svn-id: file:///home/svn/framework3/trunk@9885 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-20 06:38:29 +00:00
Jonathan Cran 6c22bf18eb task log regex'ing gets a much-needed makeover
git-svn-id: file:///home/svn/framework3/trunk@9881 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-20 04:40:16 +00:00
Jonathan Cran 25ec150e04 removed debugging lines
git-svn-id: file:///home/svn/framework3/trunk@9859 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-19 17:46:26 +00:00
Jonathan Cran a131d9a892 failure exceptions
git-svn-id: file:///home/svn/framework3/trunk@9858 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-19 17:12:36 +00:00
Jonathan Cran 0ed10f762d msf-specific test library
git-svn-id: file:///home/svn/framework3/trunk@9851 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-16 22:36:42 +00:00
Joshua Drake 0e72894e58 more cleanups
git-svn-id: file:///home/svn/framework3/trunk@9212 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-03 17:13:09 +00:00
HD Moore 3f59ea2f95 Handle a return() from a proc a bit more gracefully, add a test case
git-svn-id: file:///home/svn/framework3/trunk@8008 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-28 19:44:14 +00:00
HD Moore 75cfef006a Adds a rspec test for taskmanager
git-svn-id: file:///home/svn/framework3/trunk@7998 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-28 00:27:18 +00:00
James Lee 862efac37d add a rakefile so 'rvm specs' works
git-svn-id: file:///home/svn/framework3/trunk@7896 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-17 01:07:51 +00:00
James Lee 683edd1462 add test to make sure num_ips == length
git-svn-id: file:///home/svn/framework3/trunk@7780 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-09 21:31:29 +00:00
James Lee a96a23f95c add cidr parsing for ipv6
git-svn-id: file:///home/svn/framework3/trunk@7707 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-04 20:17:28 +00:00
James Lee 1e6b6b3d62 fix ipv6 handling for single addresses
git-svn-id: file:///home/svn/framework3/trunk@7706 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-04 19:55:58 +00:00
James Lee 5952e29040 modify address range specification (for e.g. RHOSTS) to use nmap notation, fixes #182
git-svn-id: file:///home/svn/framework3/trunk@7705 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-04 19:37:14 +00:00
James Lee 14a0040b8a move nmap xml parsing into Rex::Parser; add a test to make sure it works
git-svn-id: file:///home/svn/framework3/trunk@7566 4d416f70-5f16-0410-b530-b9f4589650da
2009-11-18 06:15:45 +00:00
James Lee 8a691a20ff fix warnings printed by ruby 1.8
git-svn-id: file:///home/svn/framework3/trunk@7485 4d416f70-5f16-0410-b530-b9f4589650da
2009-11-12 20:43:21 +00:00
James Lee fa3a86ec7a test all targets, not just the default. this found the bug fixed in r7483
git-svn-id: file:///home/svn/framework3/trunk@7484 4d416f70-5f16-0410-b530-b9f4589650da
2009-11-12 20:37:30 +00:00
HD Moore 35fcf8c2b2 Swap around rbreadline - load it by default, but also allow the old readline with the -L (--real-readline) parameter to msfconsole. This also fixes absolute path handling for msfconsole command passthrough
git-svn-id: file:///home/svn/framework3/trunk@7115 4d416f70-5f16-0410-b530-b9f4589650da
2009-10-02 14:17:03 +00:00
HD Moore 2b5d69447a Adds some rspec tests for the framework class, ensure that all modules can be created and have payloads listed
git-svn-id: file:///home/svn/framework3/trunk@7109 4d416f70-5f16-0410-b530-b9f4589650da
2009-10-01 18:18:01 +00:00
HD Moore 43a3b80401 Commit some testing tools
git-svn-id: file:///home/svn/framework3/trunk@7106 4d416f70-5f16-0410-b530-b9f4589650da
2009-10-01 16:04:48 +00:00