Skip to content

PaymasterMax/Bourne-Shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐚 Bourne - scripts

📁

This project is organized into folders . With each folder containing bash scripts that handle specific task given. All scripts will be listed down below with their corresponding
functionality and their case.

1. - Ip-Scrapper ( IP Lookup )

  • This script accepts text that has ip address inline with text or purely ip address
  • The script gets to work as soon as information is just buffered on the pipe
  • It Searches through the piped information for IP information
  • It then fetches Ip information from Ip to GeoInfor.
  • The information returned is in json format, we then pass the information through to awk 🦅 Command
  • The information is formated to the following structure.
status -> success
country -> United States
countryCode -> US
region -> FL
regionName -> Florida
city -> Tampa
zip -> 33614
lat ->28.0109
lon ->-82.4948
timezone -> America/New_York
isp -> HIVELOCITY
Inc.
org -> NOC4Hosts Inc
as -> AS29802 HIVELOCITY
Inc.
query -> 96.31.83.1
  • The command has an option argument --save or -s that tells the script whether to store the
    information Scrapped or not.
  • Sample of running the program
  • Some command that outputs text with ip | ipScrapper [ARGS]

Installation instructions:

$ cd Dir_name;
$ target_file=./ipScrapper
$ cd ipScrapper;
$ sudo chmod +x $target_file
$ sudo ln -s $(pwd)/target_file /usr/local/bin/target_file;
$ sudo ln -s /usr/local/bin/target_file /usr/local/sbin/target_file;

2. - Git-Daemon

  • This big guy is a GitHub-Cli wrapper that makes your day as a developer, easy
    What does it do! you may ask, well the script provides the basic functionality of git
    like pushing and pulling updates to local repository.

  • The script also allows you, the user to add custom commit messages, if you don't provide, the script
    will add a crafted commit message just right out of the box. So you as a developer can push changes quickly
    The script automates pull / push request and optionally forcing updates
    online or offline using the -f.

  • First thing after installing is typing gitwrap -h to see it's usage
    Installation instructions.

$ cd Dir_name;
$ cd Git-Daemon;
$ sudo chmod +x ./gmv2
$ sudo ln -s $(pwd)/gmv2 /usr/local/bin/;
$ sudo ln -s /usr/local/sbin/gitwrap /usr/local/bin/gmv2;
$ gitwrap -h

🙌 You have your script on standby ready to execute
Command to use now is gitwrap [args]

Usage:
gitwrap -o push / pull -o specifies the operation to perform.
gitwrap -o push / pull -f -f specifies to push or pull forcefully, this overwrites changes at the end of the endpoint (either remote or local).
gitwrap -o push / pull -d -d --directory directory to push. Defaults to the current directory.
gitwrap -o push / pull -b -b --branch branch to carry operations on. This defaults to main if not specified.
gitwrap -o push / pull -m -m --msg commit message. This has a default commit message.

usage infor will be displayed.

All Unicode characters can be found here. Unicode Characters

3. - FTP Server

 - The ftp script located in the folder ftp is a auto upload backup script to remote ftp server <br>
 - The script can be setup with `cronjob` to automatically get scheduled for upload.
 - The Remote server can be setup to accept connection and upload from your machine.

Installation instructions are as follows.

$ cd Dir_name;
$ cd ftp;
$ sudo chmod +x ./ftp.sh
$ sudo ln -s $(pwd)/ftp.sh /usr/local/bin/ftp.sh;
$ sudo ln -s /usr/local/bin/ftp.sh /usr/local/sbin/cftp;
$ cftp -h

You can now go ahead to setup the cronjob. If you don't know how to use cronjobs feel free to checkout the link CronJobs Unix

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages