Silverstripe-sspy - Python based SSPAK export with higher reliability and cross-platform compatibility

Overview

SSPY - Python Stand-alone SSPAK solution

© Simon Firesphere Erkelens; Moss Mossman Cantwell

Usage:

  sspy [create|load|extract] (db|assets) --file=my.sspak --db=mydb.tar.gz --assets=myassets.tar.gz --webroot=relative/path/to/webroot

the db and assets commands are optional.

This script should preferably be run from the webroot of the site

Arguments:

create
       db     Only create a database snapshot
       assets Only create an assets snapshot
       none   Create a full snapshot
load
       No arguments required, it detects if there is a database or assets
       Warning: No backup of database or assets will be created!
extract
       No arguments required. The SSPAK file will be extracted in to database.sql.gz and assets.tar.gz

Parameters

--file=|-f 
             Required, path to the sspak. E.g. --file=my.sspak or -f my.sspak
             (note, no = sign for the shorthand!
--db=|-d 
             Optional, path to existing database file, e.g. --db=mydatabase.sql.gz or -d mydatabase.sql.gz to create the sspak from existing sources
             (note, no = sign for the shorthand!
--assets=|-a 
             Optional, path to existing assets file, e.g. --assets=myassets.tar.gz or -a myassets.tar.gz to create the sspak from existing sources
             (note, no = sign for the shorthand!

--webroot=|-w 
              Optional, relative path from the current location to the webroot

Options

Option Description
create Create a new sspak
load Load an existing sspak

Optional options

Sub option Description
db Database only
assets Assets only

Arguments

Argument Description Default Required
--file The file to read or write None Yes
--db Path to the database sql.gz file to create from existing None No
--assets Path to the assets tar.gz file to create from existing None No
--webroot Relative path to the webroot from the current location . No

Shorthands are available, instead of --file you can use -f, instead of --db you can use -d and instead of --assets you can use -a and instead of --webroot you can use -w

Note that using shorthand commands, it should be -f myfile.sspak instead of --file=myfile.sspak

The db and assets arguments are optional. If omitted, the actual database and assets folder will be used.

The file name can be anything, but will be appended with .sspak if the file name does not have the correct extension.

CAUTION Not providing a unique file name, might cause a single sspak to be loaded with the same files over and over, appending data to them instead of replacing!

Building

For Windows 10, using PyInstaller, make sure the Windows SDK libraries are installed and add the libraries to your path.

set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86 set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64

To build, run pyinstaller sspy.spec (On your preferred platform)

Attributions

  • João Magalhães - The original MySQL Dump library which has been altered to fit our needs and have a bit more flexibility overall
  • The pymysql project
  • The DotEnv project

License

This module is published under BSD 3-clause license

http://www.opensource.org/licenses/BSD-3-Clause

Copyright &copy 2019-NOW(), Simon Firesphere Erkelens; Moss Mossman Cantwell

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Did you read this entire readme?

You rock!

Pictured below is a cow, just for you.


               /( ,,,,, )\
              _\,;;;;;;;,/_
           .-"; ;;;;;;;;; ;"-.
           '.__/`_ / \ _`\__.'
              | (')| |(') |
              | .--' '--. |
              |/ o     o \|
              |           |
             / \ _..=.._ / \
            /:. '._____.'   \
           ;::'    / \      .;
           |     _|_ _|_   ::|
         .-|     '==o=='    '|-.
        /  |  . /       \    |  \
        |  | ::|         |   | .|
        |  (  ')         (.  )::|
        |: |   |;  U U  ;|:: | `|
        |' |   | \ U U / |'  |  |
        ##V|   |_/`"""`\_|   |V##
           ##V##         ##V##

And a monkey!

_______AAAA_______________AAAA________
       VVVV               VVVV        
       (__)               (__)
        \ \               / /
         \ \   \\|||//   / /
          > \   _   _   / <
           > \ / \ / \ / <
            > \\_o_o_// <
             > ( (_) ) <
              >|     |<
             / |\___/| \
             / (_____) \
             /         \
              /   o   \
               ) ___ (   
              / /   \ \  
             ( /     \ )
             ><       ><
            ///\     /\\\
            '''       '''
You might also like...
A comprehensive library for generating differences between two strings in multiple formats (unified, side by side HTML etc). Based on the difflib implementation in Python

PHP Diff Class Introduction A comprehensive library for generating differences between two hashable objects (strings or arrays). Generated differences

This project backports features found in the latest PHP versions and provides compatibility layers for some extensions and functions

This project backports features found in the latest PHP versions and provides compatibility layers for some extensions and functions. It is intended to be used when portability across PHP versions and extensions is desired.

Backwards compatibility Extension and Library for PHP 8.x and later

colopl_bc Provides various compatibility functions required for PHP (temporary) migration. WARNING This extension is intended for temporary use only.

PHP 7 Compatibility Checker

PHP 7 Compatibility Checker(php7cc) Project status The project is no longer supported. Please consider using one of the following alternatives: phan p

The tool converts different error reporting standards for deep compatibility with popular CI systems (TeamCity, IntelliJ IDEA, GitHub Actions, etc).
The tool converts different error reporting standards for deep compatibility with popular CI systems (TeamCity, IntelliJ IDEA, GitHub Actions, etc).

JBZoo / CI-Report-Converter Why? Installing Using as GitHub Action Example GitHub Action workflow Available Directions Help description in terminal Co

Ip2region is a offline IP location library with accuracy rate of 99.9% and 0.0x millseconds searching performance. DB file is ONLY a few megabytes with all IP address stored. binding for Java,PHP,C,Python,Nodejs,Golang,C#,lua. Binary,B-tree,Memory searching algorithm

Ip2region是什么? ip2region - 准确率99.9%的离线IP地址定位库,0.0x毫秒级查询,ip2region.db数据库只有数MB,提供了java,php,c,python,nodejs,golang,c#等查询绑定和Binary,B树,内存三种查询算法。 Ip2region特性

SERP Scraping API code examples for Python, PHP and Node.js

SERP Scraping API List of contents Introduction Authentication Google Baidu Bing Yandex Parameters Targets Languages License Introduction With our SER

Repo pour la Nuit de l'Info 2021, équipe Passage Python

Passage Python Repo pour la Nuit de l'Info 2021, équipe Passage Python Les membres de l'équipe sont : Florian Duzes, FloDarPie Theo Cavailles, igneefl

implementation  of a simple Brute-force attack in python
implementation of a simple Brute-force attack in python

Brute-force-attack-python implementation of a simple Brute-force attack in python using requests library who involved in this project: Python side : A

Comments
  • hard to run on jessie

    hard to run on jessie

    vagrant@jessie:/vagrant$ python3 main.py Traceback (most recent call last): File "main.py", line 14, in dotenv.load_dotenv(dotenv_path=env_path) File "/usr/local/lib/python3.4/dist-packages/dotenv/main.py", line 12, in load_dotenv if not os.path.exists(dotenv_path): File "/usr/lib/python3.4/genericpath.py", line 19, in exists os.stat(path) TypeError: argument should be string, bytes or integer, not PosixPath

    opened by Mossman1215 3
  • Add the base_path and file_path back in

    Add the base_path and file_path back in

    I have, for ease of development, temporarily removed the path definitions on the MySQL Dump class. These path definitions should stay in place to keep the library flexible and possibly redistributable

    opened by Firesphere 0
  • CVE-2007-4559 Patch

    CVE-2007-4559 Patch

    Patching CVE-2007-4559

    Hi, we are security researchers from the Advanced Research Center at Trellix. We have began a campaign to patch a widespread bug named CVE-2007-4559. CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using extract() or extractall() on a tarfile object without sanitizing input, a maliciously crafted .tar file could perform a directory path traversal attack. We found at least one unsantized extractall() in your codebase and are providing a patch for you via pull request. The patch essentially checks to see if all tarfile members will be extracted safely and throws an exception otherwise. We encourage you to use this patch or your own solution to secure against CVE-2007-4559. Further technical information about the vulnerability can be found in this blog.

    If you have further questions you may contact us through this projects lead researcher Kasimir Schulz.

    opened by TrellixVulnTeam 1
Owner
Simon Erkelens
At the edge of sanity
Simon Erkelens
Check modules in app/code and vendor for PHP 8 compatibility status - PHP_CodeSniffer & php-compatibility standard

M2 PHP version compatibility check How To use Requires PHP 7.3+ | PHP 8 This app will run PHP_CodeSniffer with phpcompatibility/php-compatibility on t

William Tran 24 Oct 13, 2022
Silverstripe-searchable - Adds to the default Silverstripe search by adding a custom results controller and allowing properly adding custom data objects and custom fields for searching

SilverStripe Searchable Module UPDATE - Full Text Search This module now uses Full Text Support for MySQL/MariaDB databases in version 3.* Adds more c

ilateral 13 Apr 14, 2022
Silverstripe-masquerade - SilverStripe module to allow users to "masquerade" as other users

SilverStripe Masquerade Module About This module is designed to allow an Administrator to "login" as another "Member" without changing their password

Daniel Hensby 14 Apr 14, 2022
Silverstripe-debugbar/ - SilverStripe DebugBar module

SilverStripe DebugBar module Requirements SilverStripe ^4.0 maximebf/php-debugbar jdorn/sql-formatter Installation You can install the debug bar with

Thomas Portelange 52 Dec 21, 2022
Silverstripe-fulltextsearch - Adds external full text search engine support to SilverStripe

FullTextSearch module Adds support for fulltext search engines like Sphinx and Solr to SilverStripe CMS. Compatible with PHP 7.2 Important notes when

Silverstripe CMS 42 Dec 30, 2022
A SilverStripe module for conveniently injecting JSON-LD metadata into the header of each rendered page in SilverStripe

A SilverStripe module for conveniently injecting JSON-LD metadata into the header of each rendered page in Silver

null 4 Apr 20, 2022
Silverstripe module allowing editors to create newsletters using elemental blocks and export them to a sendy instance

Silverstripe Sendy Silverstripe module allowing editors to create newsletters using elemental blocks and export them to a sendy instance. Introduction

Syntro Opensource 4 Apr 20, 2022
This project is very diverse and based upon many languages and libraries such as C++, Python, JavaScript, PHP and MQTT

ADMS-Real-time-project This project is very diverse and based upon many languages and libraries such as C++, Python, JavaScript, PHP and MQTT Advance_

Nitya parikh 1 Dec 1, 2021
HLedger is cross-platform accounting software for both power users and folks new to accounting

HLedger Plain Text Accounting on Nextcloud HLedger is cross-platform accounting software for both power users and folks new to accounting. It's good f

Ryan Boder 11 Jan 20, 2022
Fresns core library: Cross-platform general-purpose multiple content forms social network service software

About Fresns Fresns is a free and open source social network service software, a general-purpose community product designed for cross-platform, and su

Fresns 82 Dec 31, 2022