Skip to content

Commit

Permalink
Small cleaning of typos
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisMalhadas committed Jul 19, 2023
1 parent 5e07569 commit ce984d8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ RUN apt-get update && \

# Copy the script to the container
COPY getToken.sh /opt/getToken.sh
#COPY addToWhiteList.sh /opt/curl_script.sh
COPY deleteFromWhiteList.sh /opt/curl_script.sh
COPY addToWhiteList.sh /opt/curl_script.sh
#COPY deleteFromWhiteList.sh /opt/curl_script.sh

# Set the script as executable
RUN chmod +x /opt/getToken.sh
Expand Down
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,33 @@

This is a work in progress.

## Requirements
- Docker (optional)
- Linux Shell
- Curl
## Requirements
- Docker (optional)
- Linux Shell
- Curl

## Usage
## Usage

### Docker
1. Build the image
### Docker
1. Build the image
```bash
docker build -t deeper-network-auto-requester .
docker build -t deeper-network-auto-requester .
```
2. Run the image
2. Run the image

```bash
docker run --rm deeper-network-auto-requester <IP RANGE> <COUNTRY CODE> <USERNAME> <PASSWORD>
docker run --rm deeper-network-auto-requester <IP RANGE> <COUNTRY CODE> <USERNAME> <PASSWORD>
```
It only adds, for the moment. If you wish to delete using docker image just edit the dockerfile and switch the comment between lines 9 and 10. And off course build the image again.
To remove the country code is not used.
### Shell
Add to the White List

```bash
./opt/addToWhiteList.sh <IP RANGE> <COUNTRY CODE> <USERNAME> <PASSWORD>
```
Remove from the White List

```bash
./opt/deleteFromWhiteList.sh <IP RANGE> <USERNAME> <PASSWORD>
```
Expand Down
9 changes: 4 additions & 5 deletions deleteFromWhiteList.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#!/bin/bash

# Check if all three arguments are provided
if [ $# -ne 4 ]; then
echo "Usage: $0 <ip_range> <country_code> <username> <password>"
if [ $# -ne 3 ]; then
echo "Usage: $0 <ip_range> <username> <password>"
exit 1
fi

# Parse the IP range, country code, and bearer token from arguments
ip_range=$1
country_code=$2
username=$3
password=$4
username=$2
password=$3

# Function to convert IP address to integer
ip_to_int() {
Expand Down

0 comments on commit ce984d8

Please sign in to comment.