Why packet length in Metasploit is always different?

I created an attack scenario in VirtualBox to test ms08-067 vulnerability. I’m testing Snort IDS and I noticed that the triggered alerts due to the attack have always a different packet length. I repeated the attack several times and the packet length in the alertas is variable, but I don’t understand why. What is the reason?

I used “windows/meterpreter/reverse_tcp” payload.

Magento 2 : In registration page how to ask for shipping address different than company address?

In registration form I want to ask the user if he wants to use a different address for shipping address. If that is true, then he can input the fields for the shipping Address. I have tried to override and modify register.phtml form that is located in the path app/design/frontend/Vendor/Theme/Magento_Customer/templates/form/ register.phtml

I tried to copy the whole form for address and put <input type="hidden" name="default_shipping" value="1"> in the form for shipping Address, however when I submit the form it copies the data from company form into shipping address form. It duplicates the info and I get an error Delete operation . This is the field set for shipping Address

<fieldset id = "shipping-address-register" class="fieldset address">         <legend class="legend"><span><?= $  block->escapeHtml(__('Business Shipping Address')) ?></span></legend><br>         <input type="hidden" name="create_address" value="1" />          <?php $  _company = $  block->getLayout()->createBlock('Magento\Customer\Block\Widget\Company') ?>         <?php if ($  _company->isEnabled()): ?>             <?= $  _company->setCompany($  block->getFormData()->getCompany())->toHtml() ?>         <?php endif ?>          <?php $  _telephone = $  block->getLayout()->createBlock('Magento\Customer\Block\Widget\Telephone') ?>         <?php if ($  _telephone->isEnabled()): ?>             <?= $  _telephone->setTelephone($  block->getFormData()->getTelephone())->toHtml() ?>         <?php endif ?>          <?php $  _fax = $  block->getLayout()->createBlock('Magento\Customer\Block\Widget\Fax') ?>         <?php if ($  _fax->isEnabled()): ?>             <?= $  _fax->setFax($  block->getFormData()->getFax())->toHtml() ?>         <?php endif ?>          <?php $  _streetValidationClass = $  this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?>          <div class="field street required">             <label for="street_1" class="label"><span><?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('street') ?></span></label>             <div class="control">                 <input type="text" name="street[]" value="<?= $  block->escapeHtmlAttr($  block->getFormData()->getStreet(0)) ?>" title="<?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('street') ?>" id="street_1" class="input-text <?= $  block->escapeHtmlAttr($  _streetValidationClass) ?>">                 <div class="nested">                     <?php $  _streetValidationClass = trim(str_replace('required-entry', '', $  _streetValidationClass)); ?>                     <?php for ($  _i = 2, $  _n = $  this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $  _i <= $  _n; $  _i++): ?>                         <div class="field additional">                             <label class="label" for="street_<?= /* @noEscape */ $  _i ?>">                                 <span><?= $  block->escapeHtml(__('Address')) ?></span>                             </label>                             <div class="control">                                 <input type="text" name="street[]" value="<?= $  block->escapeHtml($  block->getFormData()->getStreetLine($  _i - 1)) ?>" title="<?= $  block->escapeHtmlAttr(__('Street Address %1', $  _i)) ?>" id="street_<?= /* @noEscape */ $  _i ?>" class="input-text <?= $  block->escapeHtmlAttr($  _streetValidationClass) ?>">                             </div>                         </div>                     <?php endfor; ?>                 </div>             </div>         </div>          <div class="field required">             <label for="city" class="label"><span><?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('city') ?></span></label>             <div class="control">                 <input type="text" name="city" value="<?= $  block->escapeHtmlAttr($  block->getFormData()->getCity()) ?>" title="<?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('city') ?>" class="input-text <?= $  block->escapeHtmlAttr($  this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city')) ?>" id="city">             </div>         </div>          <div class="field region required">             <label for="region_id" class="label"><span><?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('region') ?></span></label>             <div class="control">                 <select id="region_id" name="region_id" title="<?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('region') ?>" class="validate-select" style="display:none;">                     <option value=""><?= $  block->escapeHtml(__('Please select a region, state or province.')) ?></option>                 </select>                 <input type="text" id="region" name="region" value="<?= $  block->escapeHtml($  block->getRegion()) ?>" title="<?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('region') ?>" class="input-text <?= $  block->escapeHtmlAttr($  this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region')) ?>" style="display:none;">             </div>         </div>          <div class="field zip required">             <label for="zip" class="label"><span><?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('postcode') ?></span></label>             <div class="control">                 <input type="text" name="postcode" value="<?= $  block->escapeHtmlAttr($  block->getFormData()->getPostcode()) ?>" title="<?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('postcode') ?>" id="zip" class="input-text validate-zip-international <?= $  block->escapeHtmlAttr($  this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode')) ?>">             </div>         </div>           <div class="field country required">             <label for="country" class="label"><span><?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('country_id') ?></span></label>             <div class="control">                 <?= $  block->getCountryHtmlSelect() ?>             </div>         </div>           <?php $  addressAttributes = $  block->getChildBlock('customer_form_address_user_attributes');?>         <?php if ($  addressAttributes): ?>             <?php $  addressAttributes->setEntityType('customer_address'); ?>             <?php $  addressAttributes->setFieldIdFormat('address:%1$  s')->setFieldNameFormat('address[%1$  s]');?>             <?php $  block->restoreSessionData($  addressAttributes->getMetadataForm(), 'address');?>             <?= $  addressAttributes->setShowContainer(false)->toHtml() ?>         <?php endif;?>         <input type="hidden" name="default_shipping" value="1">      </fieldset> 

This is the fieldset for General Company address

  <?php if ($  block->getShowAddressFields()): ?>     <fieldset class="fieldset address">         <legend class="legend"><span><?= $  block->escapeHtml(__('Business Address Information')) ?></span></legend><br>         <input type="hidden" name="create_address" value="1" />          <?php $  _company = $  block->getLayout()->createBlock('Magento\Customer\Block\Widget\Company') ?>         <?php if ($  _company->isEnabled()): ?>             <?= $  _company->setCompany($  block->getFormData()->getCompany())->toHtml() ?>         <?php endif ?>          <?php $  _telephone = $  block->getLayout()->createBlock('Magento\Customer\Block\Widget\Telephone') ?>         <?php if ($  _telephone->isEnabled()): ?>             <?= $  _telephone->setTelephone($  block->getFormData()->getTelephone())->toHtml() ?>         <?php endif ?>          <?php $  _fax = $  block->getLayout()->createBlock('Magento\Customer\Block\Widget\Fax') ?>         <?php if ($  _fax->isEnabled()): ?>             <?= $  _fax->setFax($  block->getFormData()->getFax())->toHtml() ?>         <?php endif ?>          <?php $  _streetValidationClass = $  this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?>          <div class="field street required">             <label for="street_1" class="label"><span><?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('street') ?></span></label>             <div class="control">                 <input type="text" name="street[]" value="<?= $  block->escapeHtmlAttr($  block->getFormData()->getStreet(0)) ?>" title="<?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('street') ?>" id="street_1" class="input-text <?= $  block->escapeHtmlAttr($  _streetValidationClass) ?>">                 <div class="nested">                     <?php $  _streetValidationClass = trim(str_replace('required-entry', '', $  _streetValidationClass)); ?>                     <?php for ($  _i = 2, $  _n = $  this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $  _i <= $  _n; $  _i++): ?>                         <div class="field additional">                             <label class="label" for="street_<?= /* @noEscape */ $  _i ?>">                                 <span><?= $  block->escapeHtml(__('Address')) ?></span>                             </label>                             <div class="control">                                 <input type="text" name="street[]" value="<?= $  block->escapeHtml($  block->getFormData()->getStreetLine($  _i - 1)) ?>" title="<?= $  block->escapeHtmlAttr(__('Street Address %1', $  _i)) ?>" id="street_<?= /* @noEscape */ $  _i ?>" class="input-text <?= $  block->escapeHtmlAttr($  _streetValidationClass) ?>">                             </div>                         </div>                     <?php endfor; ?>                 </div>             </div>         </div>          <div class="field required">             <label for="city" class="label"><span><?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('city') ?></span></label>             <div class="control">                 <input type="text" name="city" value="<?= $  block->escapeHtmlAttr($  block->getFormData()->getCity()) ?>" title="<?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('city') ?>" class="input-text <?= $  block->escapeHtmlAttr($  this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city')) ?>" id="city">             </div>         </div>          <div class="field region required">             <label for="region_id" class="label"><span><?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('region') ?></span></label>             <div class="control">                 <select id="region_id" name="region_id" title="<?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('region') ?>" class="validate-select" style="display:none;">                     <option value=""><?= $  block->escapeHtml(__('Please select a region, state or province.')) ?></option>                 </select>                 <input type="text" id="region" name="region" value="<?= $  block->escapeHtml($  block->getRegion()) ?>" title="<?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('region') ?>" class="input-text <?= $  block->escapeHtmlAttr($  this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region')) ?>" style="display:none;">             </div>         </div>          <div class="field zip required">             <label for="zip" class="label"><span><?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('postcode') ?></span></label>             <div class="control">                 <input type="text" name="postcode" value="<?= $  block->escapeHtmlAttr($  block->getFormData()->getPostcode()) ?>" title="<?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('postcode') ?>" id="zip" class="input-text validate-zip-international <?= $  block->escapeHtmlAttr($  this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode')) ?>">             </div>         </div>           <div class="field country required">             <label for="country" class="label"><span><?= /* @noEscape */ $  block->getAttributeData()->getFrontendLabel('country_id') ?></span></label>             <div class="control">                 <?= $  block->getCountryHtmlSelect() ?>             </div>         </div>           <?php $  addressAttributes = $  block->getChildBlock('customer_form_address_user_attributes');?>         <?php if ($  addressAttributes): ?>             <?php $  addressAttributes->setEntityType('customer_address'); ?>             <?php $  addressAttributes->setFieldIdFormat('address:%1$  s')->setFieldNameFormat('address[%1$  s]');?>             <?php $  block->restoreSessionData($  addressAttributes->getMetadataForm(), 'address');?>             <?= $  addressAttributes->setShowContainer(false)->toHtml() ?>         <?php endif;?>         <input type="hidden" name="default_billing" value="1">       </fieldset> 

Thanks and greetings!

How to automatically set date in a cell when a different cell value is changed by a formula from data on another sheet?

I currently have a column, e.g. ColB, containing SUMIF functions with its data range from other sheets and a column, e.g. ColC, with dates that I want to automatically update to the last date ColB’s value were changed. Here’s a picture to illustrate what I mean:

enter image description here

From searching around, I found the following Google Apps Scripts but they only seem to work if the change to ColB’s cells is a direct edit as opposed to its value changing from the SUMIF function recalculating new data:

Example Script 1:

function onEdit(e) { if ([2, 5, 8, 11].indexOf(e.range.columnStart) != -1) { e.range.offset(0, 1).setValue(new Date()); } }

Example Script 2:

    function onEdit() {  var s = SpreadsheetApp.getActiveSheet();  if( s.getName() == "Sheet1" ) { //checks that we're on the correct sheet    var r = s.getActiveCell();    if( r.getColumn() == 13 ) { //checks the column      var nextCell = r.offset(0, 1);      if( nextCell.getValue() === '' ) //is empty?        var time = new Date();        time = Utilities.formatDate(time, "GMT", "HH:mm:ss");        nextCell.setValue(time);    };  }; } 

Is there a Google Apps script that can execute what I want? Thanks for any help and suggestions!

How to warn people that they are about to navigate to a different page?

In the accessibility design guidelines for navigation Apple recommends the following:

Warn people before they activate a control that opens a different webpage or app. Changing the context without warning can cause confusion and forces people suddenly to rebuild their mental model of the onscreen environment.

Unfortunately, they don’t provide a specific recommendation on how to achieve that. What are the best practices in this space?

Mapping to a server on a different subnet

As the title proclaims, I need help with mapping a computer to a server on a different subnet.

Ex :

Computer 1 (non-server) is on a 10.x.x.x network, with router gateway set to 10.0.0.1.

Computer 2 (server) is on a 192.168.x.x network, that is currently extended from Computer 1’s Ethernet port into a separate router. I am unsure if this needs to be said, but I have a switch off this router which runs any machine I bring in that does not have a wireless card. The IP addresses of the physically switched machines carry the 10.x.1.x notation.

The router that Computer 2 is connected to is a 10.x.x.x network, with same gateway as Computer 1 set to 10.0.0.1. I have this router configured to have a static IP of 10.0.0.100 on the main router.

What I am having a problem understanding is how I can connect from Computer 1 to the server on computer 2. I can connect when on the same WiFi as Computer 2, but if I connect to that WiFi on Computer 1, the bridge I have set up fails and there is no connectivity.

Why I am using a bridge from Computer 1 is that my current networking set up does not allow for me to add another modem/router combo in that section of the building. Bridging was the only way that I could extend the network with the supplies I had on hand.

If anyone has any idea what I can do I would greatly appreciate it!

Thanks a bunch

Same events for different aggregates in CQRS?

I’m developing an application using CQRS + ES.

Now I have 2 aggregates which are technically almost exactly the same, only they are different concepts in the domain. Therefore I will separate them into their own aggregates, but I could still use the same events for both aggregates. This would save a lot of work and pointless complexity in the application. Basically they are the same class that has only been separated for DDD sake.

Would there be a problem with this design? The aggregates themselves are responsible for maintaining correct state, so that would not be a problem. The read model does not deal with aggregates anyway, and it doesn’t care about the (small) distinction between those 2 aggregates.

Aggregate classes would look similar to the following:

// Aggregate 1 public class Page : AggregateRoot {     public Page(string id, ...)     {         this.Id = id;          // Same event for different aggregates.         ApplyChange(new ContentCreatedEvent(...));     }      // etc. }  // Aggregate 2 public class Asset : AggregateRoot {     public Asset(string id, ...)     {         this.Id = id;          // Same event for different aggregates.         ApplyChange(new ContentCreatedEvent(...));     }      // etc. } 

How to maintain two domains in the same installation having different $base_url

I have published a new domain for my drupal installation. It has a fixed $ base_url configured in settings.php. For example: https://www.olddomain.com.ar . It throws an ajax exception when I use a textfield with an autocomplete_path under the new domain https://new.domain.com.ar

The error is: “An AJAX HTTP request terminated abnormally.”

can anyone help me?