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
# init console with metasploit framwork | |
@console = Msf::Ui::Web::WebConsole.new(@framework,1) | |
# used to exec a command like it would be typed into msfconsole | |
def cmd_send_to_terminal cmd | |
@console.execute(cmd) | |
return @[email protected] | |
end | |
# used to interact with an open meterpreter session |
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
require 'rubygems' | |
require 'em-http-request' | |
require 'active_support' | |
EventMachine.run { | |
$http = EventMachine::HttpRequest.new("ws://localhost:8080/").get :timeout => 0 | |
$http.errback { |e| puts "oops #{e}" } | |
$http.callback { | |
puts "WebSocket connected!" |
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
set :application, "....." | |
set :deploy_to, "......" | |
set :scm, :subversion | |
set :deploy_via, :checkout | |
set :user, "SECRET" | |
set :password, "SECRECT" | |
set :use_sudo, true | |
set :svn_user, "SECRECT" |
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
# From http://ariejan.net/2006/12/13/show-the-current-svn-revision-in-your-rails-app/ | |
def get_revision | |
return `svn info #{RAILS_ROOT} | grep ^Revision` | |
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
require 'rubygems' | |
require 'action_mailer' | |
require 'mechanize' | |
# Delivery | |
SENDER_MAIL = "[email protected]" | |
ActionMailer::Base.delivery_method = :smtp | |
ActionMailer::Base.smtp_settings = { | |
:address => "mail.gmx.de", | |
:port => 25, |
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
module Msf | |
module Ui | |
module Console | |
class Driver < Msf::Ui::Driver | |
alias_method :old_unknown_command, :unknown_command | |
def unknown_command(method, line) | |
self.on_command_proc.call(line.strip) if self.on_command_proc | |
old_unknown_command(method,line) | |
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
$ bin/magento | |
We're sorry, an error occurred. Try clearing the cache and code generation directories. By default, they are: var/cache, var/di, var/generation, and var/page_cache. | |
[Zend\ServiceManager\Exception\ServiceNotCreatedException] | |
An abstract factory could not create an instance of magentosetupconsolecommandmoduleuninstallcommand(alias: Magento\Setup\Console\Command\ModuleUninstallC | |
ommand). | |
[Zend\ServiceManager\Exception\ServiceNotCreatedException] | |
An exception was raised while creating "Magento\Setup\Console\Command\ModuleUninstallCommand"; no instance returned | |
[Magento\Framework\Exception\FileSystemException] |
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
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); |
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
$directoryReader = $objectManager->create("\Magento\Framework\Module\Dir\Reader"); | |
$moduleDirectory = $directoryReader->getModuleDir('', 'Vendor_Modulename'); | |
echo "directory of module is ".$moduleDirectory; |
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
XDEBUG_CONFIG="idekey=PHPSTORM" php -dxdebug.remote_host=192.168.56.1 -dxdebug.remote_enable=on -f bin/magento setup:upgrade |
OlderNewer