/ishare2-cli

Tool designed to download images into a PNETLab server

Primary LanguageShell

ishare2

A CLI-based tool written in Bash to easily download and manage images in your PNetLab server

(and possibly other similar platforms)

⭐New: Since v1.5.7, a web app was released to use ishare2 from a web browser.

The web app's source code can be found in its GitHub repo: ishare2 web GUI

πŸ› οΈ Language

Bash 

πŸ“š Summary

πŸš€ Installation

There are different ways of installing ishare2 in your terminal. Choose one of the following options:

wget

wget -O /usr/sbin/ishare2 https://raw.githubusercontent.com/pnetlabrepo/ishare2/main/ishare2 > /dev/null 2>&1 && chmod +x /usr/sbin/ishare2 && ishare2

curl

curl -o /usr/sbin/ishare2 https://raw.githubusercontent.com/pnetlabrepo/ishare2/main/ishare2 > /dev/null 2>&1 && chmod +x /usr/sbin/ishare2 && ishare2\

Manual installation

  • Download the latest version of ishare2 from the GitHub repository.
  • Copy the file to /usr/sbin/ishare2
  • Make the file executable using chmod +x /usr/sbin/ishare2
  • Run ishare2 to start using it

Note: You can install different versions of ishare2 browsing the releases page or tracking back to previous commits

βœ… Syntax

    ishare2 [action] [param1] [param2]

    action:
      search      : Search for images by type
      pull        : Download an image by type and number
      installed   : Show installed images on server
      labs        : Show labs on server and download images for those labs
      mylabs      : Same as labs command but using a customized path to labs
      relicense   : Generate a new iourc license for bin images
      upgrade     : Retrieves a menu that allows users to upgrade ishare2 and PNETLab VM
      changelog   : Show the latest changes made to ishare2
      gui         : Web app to use ishare2 in browser
      help        : Show useful information
      test        : Test if ishare2 dependencies are reachable (GitHub, Google Spreadsheets)

    param1:
      type = all, bin, qemu, dynamips, docker or name

    param2:
      number = This number can be obtained using ishare2 search <type>

Examples of usage

πŸ’Ž Search for images by type or name

ishare2 search

# ishare2 search all
# ishare2 search bin
# ishare2 search qemu
# ishare2 search dynamips

ishare2 search

Examples:

# ishare2 search vios
# ishare2 search win-
# ishare2 search winserver
# ishare2 search kali
# ishare2 search mikro
# ishare2 search forti
# ishare2 search nxos
# ishare2 search vmx
# ishare2 search esxi
# ishare2 search palo
# ishare2 search Licensed

You can search for images by name or by type. If you search by name, you will get all images that match the name you entered. If you search by type, you will get all images of that type

πŸ’Ž Pull images by image number

# ishare2 pull bin <number>
# ishare2 pull qemu <number>
# ishare2 pull dynamips <number>

The image number can be obtained using ishare2 search <type> command.

πŸ’Ž Pull all images at once

# ishare2 pull bin all
# ishare2 pull qemu all (Not available for qemu type due to its large size)
# ishare2 pull dynamips all

πŸ’Ž Show installed images on server

# ishare2 installed all
# ishare2 installed bin
# ishare2 installed qemu
# ishare2 installed dynamips
# ishare2 installed docker

πŸ’Ž Download all images needed for a lab (Default path)

ishare2 can automatically download all images needed for a lab. This feature is available for .unl labs usually downloaded from PNetLab Store or other sources.

# ishare2 labs
# ishare2 labs <number>
# ishare2 labs all

Not available for every lab because some of them are encrypted by lab authors and cannot be read by ishare2

πŸ’Ž Download all images needed for a lab (Customized path)

# ishare2 mylabs <path>
# ishare2 mylabs <path> <number>
# ishare2 mylabs <path> all

πŸ’Ž ishare2 GUI

# ishare2 gui install

# ishare2 gui start
# ishare2 gui stop
# ishare2 gui restart

πŸ’Ž Extras

# ishare2 relicense
# ishare2 upgrade
# ishare2 changelog
# ishare2 help
# ishare2 test

Useful information

HELP.md

See the latest changes on ishare2

CHANGELOG.md

How to upgrade your PNetLab server

Important: Newer versions of PNetLab might be published in PNetLab's official group chat before they are available in ishare2.

To upgrade your PNETLab server, you can use the following methods:

Note: You can also upgrade PNETLab using ishare2 upgrade, then using the option 2 and finally select an option from list.

Known limitations

  • Quota Limits:
    You might encounter quota limits when downloading images. If that happens, you can wait a few minutes and try again. If the problem persists, please contact us through our Telegram group. Search the link to the group chat in the channel's pinned message or click the chat icon in the channel's description: @NetLabHub (By not sharing the link here, we avoid spam and bots in the group chat)

πŸ”— Links

✨ Useful resources

Check these links to get information on device credentials

❓Need help?

You can get in touch with the community through the following links: