Giter Club home page Giter Club logo

wpcodegrabber's Introduction

wpCodeGrabber

wpCodeGrabber is a simple script that facilitates the download of WordPress website code (Active theme + Installed plugins) directly from the wp-admin panel. This can be particularly useful for scenarios where direct access to cPanel or the web server is not available. Additionally, it can serve as a handy tool for auditing code for security vulnerabilities when access is limited to wp-admin panel.

Tested with WP 6.4 version.

wpCodeGrabber

Requirements

For the script to function properly, ensure the following conditions are met:

  1. Theme and Plugin Editing should be enabled from wp-admin panel (default behaviour).
  2. wordpress_sec_xxxxxxxx cookie of a wordpress account able to edit theme and plugin from wp-admin panel (e.g. admin) should be provided.

Installation

  1. Clone the repository:

    git clone https://github.com/trap-bytes/wpCodeGrabber.git
  2. Navigate to the wpCodeGrabber directory:

    cd wpCodeGrabber
  3. Install the required dependencies:

    pip install -r requirements.txt

Usage

  1. To run the script:

    python3 wpCodeGrabber.py -u <WordPress_URL> -c "<Cookies>"

    Replace <WordPress_URL> with the URL of the WordPress site and <Cookies> with the cookie string to be sent with the request. In order to run the script, the wordpress_sec_xxx=xyz cookie value should be enough.

  2. Optionally, you can specify additional options:

    • -t or --theme: Download theme files only.
    • -p or --plugin: Download plugin files only.
    • -e or --extension: Specify additional extensions for file types.
    • -o or --output: Specify the output directory where the code will be saved.

Example

To download theme files only, including .svg files from a WordPress site with the URL https://example.com and cookie wordpress_sec_xxx=xyz, you would run:

python3 wpCodeGrabber.py -u https://example.com -c "wordpress_sec_xxx=xyz" -t -e svg

Note: You have to substitute the wordpress_sec_xxx cookie parameter and value with the ones returned by the Wordpress Website after login.

wpcodegrabber's People

Contributors

trap-bytes avatar

Stargazers

 avatar Nitin K avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.