Compare commits

...

16 Commits

Author SHA1 Message Date
5ca12ff53b merging in changes to do ipv6 and comments
All checks were successful
/ Plan (push) Successful in 1m11s
/ Plan (pull_request) Successful in 38s
2025-08-18 15:32:27 -05:00
45fa9221ec adding ipv6 support
All checks were successful
/ Plan (push) Successful in 1m2s
/ Plan (pull_request) Successful in 35s
2025-08-18 15:18:04 -05:00
44ea67af4d adding ipv6 support
All checks were successful
/ Plan (push) Successful in 58s
2025-08-18 15:15:40 -05:00
66d257aa7a build fixes
All checks were successful
/ Plan (push) Successful in 11s
/ Plan (pull_request) Successful in 15s
2024-11-25 09:15:52 -06:00
130cc62795 build test
All checks were successful
/ Plan (push) Successful in 11s
2024-11-25 09:14:39 -06:00
8ff72e98fd build reversion 2024-11-25 09:13:19 -06:00
fe7b3c0b09 tests 2024-11-25 09:11:20 -06:00
8fbda4f459 build t est 2024-11-25 09:10:32 -06:00
d8127d7d9c additional build changes
Some checks failed
/ Plan (pull_request) Failing after 8s
2024-11-25 09:06:29 -06:00
09f1ae2ed5 build changes 2024-11-25 09:03:25 -06:00
a3714ff873 build updates 2024-11-25 09:01:59 -06:00
280b9314e9 build testing 2024-11-25 09:01:19 -06:00
a056d05bda a
Some checks failed
/ Plan (push) Failing after 11s
2024-11-25 09:00:14 -06:00
2b8fa78dc3 build test
Some checks failed
/ Plan (push) Failing after 12s
2024-11-25 08:53:23 -06:00
c55ab9d5d3 testing build again
Some checks failed
/ Plan (push) Failing after 10s
2024-11-25 08:52:32 -06:00
f058bdd223 testing build automation
Some checks failed
/ Plan (push) Failing after 13s
2024-11-25 08:50:27 -06:00
137 changed files with 556 additions and 399 deletions

View File

@@ -1,4 +1,4 @@
Name: Container Build Check
Name: Terraform Processing
run-name: ${{ gitea.actor }}
on:
push:
@@ -12,20 +12,17 @@ jobs:
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
#
- name: List Contents
id: ls
run: ls -al
- name: Login to repo
id: login
run: echo "${{ secrets.GITEASECRET_TOKEN }}" | docker login git.hamik.net -u paradizelost --password-stdin
- name: Build
id: Build Verify
run: docker build -t git.hamik.net/paradizelost/visubnet:latest .
- name: Deploy
run: |
echo "${{ secrets.GITEASECRET_TOKEN }}" | docker login git.hamik.net -u paradizelost --password-stdin
docker build -t git.hamik.net/paradizelost/visubnet:latest .

View File

@@ -7,25 +7,18 @@ on:
jobs:
Plan:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: List Contents
id: ls
run: ls -al
- name: Login to repo
id: login
run: echo "${{ secrets.GITEASECRET_TOKEN }}" | docker login git.hamik.net -u paradizelost --password-stdin
- name: Build
id: Build Verify
run: docker build -t git.hamik.net/paradizelost/visubnet:latest .
- name: Push to Repository
id: push
run: docker push git.hamik.net/paradizelost/visubnet
- name: Deploy
run: |
echo "${{ secrets.GITEASECRET_TOKEN }}" | docker login git.hamik.net -u paradizelost --password-stdin
docker build -t git.hamik.net/paradizelost/visubnet:latest .
docker push git.hamik.net/paradizelost/visubnet

View File

@@ -1,4 +1,4 @@
FROM php:5.6-apache
COPY index.php gennum.php subnets.html /var/www/html/
COPY index.php gennum.php subnets.html calculations.js calculations_4.js calculations_6.js /var/www/html/
COPY img/* /var/www/html/img/

44
calculations.js Normal file
View File

@@ -0,0 +1,44 @@
function inet_ntoa(mode, addrint) {
var fn = "inet_ntoa_" + mode;
return window[fn](addrint);
}
function inet_aton(mode, addrint) {
var fn = "inet_aton_" + mode;
return window[fn](addrint);
}
function network_address(mode, addrint) {
var fn = "network_address_" + mode;
return window[fn](addrint);
}
function subnet_addresses(mode, addrint) {
var fn = "subnet_addresses_" + mode;
return window[fn](addrint);
}
function subnet_first_address_useable(mode, addrint) {
var fn = "subnet_first_address_useable_" + mode;
return window[fn](addrint);
}
function subnet_last_address_useable(mode, addrint) {
var fn = "subnet_last_address_useable_" + mode;
return window[fn](addrint);
}
function subnet_last_address(mode, subnet, mask) {
var fn = "subnet_last_address_" + mode;
return window[fn](mode, subnet, mask);
}
function subnet_netmask(mode, addrint) {
var fn = "subnet_netmask_" + mode;
return window[fn](addrint);
}
function num_hosts(mode, useableFirst, useableLast) {
var fn = "num_hosts_" + mode;
return window[fn](useableFirst, useableLast);
}

60
calculations_4.js Normal file
View File

@@ -0,0 +1,60 @@
function inet_ntoa_4(addrint) {
return (
((addrint >> 24) & 0xff) +
"." +
((addrint >> 16) & 0xff) +
"." +
((addrint >> 8) & 0xff) +
"." +
(addrint & 0xff)
);
};
function inet_aton_4(addrstr) {
var re = /^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/;
var res = re.exec(addrstr);
if (res === null) {
return null;
}
for (var i = 1; i <= 4; i++) {
if (res[i] < 0 || res[i] > 255) {
return null;
}
}
return (res[1] << 24) | (res[2] << 16) | (res[3] << 8) | res[4];
}
function network_address_4(ip, mask) {
var maskbits = 0;
for (var i = 31 - mask; i >= 0; i--) {
ip &= ~1 << i;
}
return ip;
}
function subnet_addresses_4(mask) {
return 1 << (32 - mask);
}
function subnet_first_address_useable_4(addrint) {
return addrint + 1;
}
function subnet_last_address_useable_4(addrint) {
return addrint - 1;
}
function subnet_last_address_4(mode, subnet, mask) {
return subnet + subnet_addresses(mode, mask) - 1;
}
function subnet_netmask_4(mask) {
return network_address(4, 0xffffffff, mask);
}
function num_hosts_4(useableFirst, useableLast) {
return 1 + useableLast - useableFirst;
}

79
calculations_6.js Normal file
View File

@@ -0,0 +1,79 @@
function inet_ntoa_6(addrint) {
return "" +
((addrint >> 112n) & BigInt(0xffff)).toString(16) +
":" +
((addrint >> 96n) & BigInt(0xffff)).toString(16) +
":" +
((addrint >> 80n) & BigInt(0xffff)).toString(16) +
":" +
((addrint >> 64n) & BigInt(0xffff)).toString(16) +
":" +
((addrint >> 48n) & BigInt(0xffff)).toString(16) +
":" +
((addrint >> 32n) & BigInt(0xffff)).toString(16) +
":" +
((addrint >> 16n) & BigInt(0xffff)).toString(16) +
":" +
(addrint & BigInt(0xffff)).toString(16);
}
function inet_aton_6(addrstr) {
var re =
/^([0-9a-f]{1,4})\:([0-9a-f]{1,4})\:([0-9a-f]{1,4})\:([0-9a-f]{1,4})\:([0-9a-f]{1,4})\:([0-9a-f]{1,4})\:([0-9a-f]{1,4})\:([0-9a-f]{1,4})$/;
var res = re.exec(addrstr);
if (res === null) {
return null;
}
for (var i = 1; i <= 8; i++) {
if (res[i] < 0 || res[i] > 0xffff) {
return null;
}
}
var r1 = BigInt(parseInt(res[1], 16)) << 112n;
var r2 = BigInt(parseInt(res[2], 16)) << 96n;
var r3 = BigInt(parseInt(res[3], 16)) << 80n;
var r4 = BigInt(parseInt(res[4], 16)) << 64n;
var r5 = BigInt(parseInt(res[5], 16)) << 48n;
var r6 = BigInt(parseInt(res[6], 16)) << 32n;
var r7 = BigInt(parseInt(res[7], 16)) << 16n;
var r8 = BigInt(parseInt(res[8], 16));
var rt = r1 | r2 | r3 | r4 | r5 | r6 | r7 | r8;
return rt;
}
function network_address_6(ip, mask) {
var maskbits = 0;
for (var i = 128 - mask; i >= 0; i--) {
ip &= ~1 << i;
}
return ip;
}
function subnet_addresses_6(mask) {
return 1n << (128n - BigInt(mask));
}
function subnet_first_address_useable_6(addrint) {
return addrint + 1n;
}
function subnet_last_address_useable_6(addrint) {
return addrint - 1n;
}
function subnet_last_address_6(mode, subnet, mask) {
return subnet + subnet_addresses(mode, mask) - 1n;
}
function subnet_netmask_6(mask) {
return undefined;
}
function num_hosts_6(useableFirst, useableLast) {
return 1n + useableLast - useableFirst;
}

View File

@@ -1,5 +1,5 @@
<?
for ($i=0;$i<=32; $i++) {
<?php
for ($i=0;$i<=128; $i++) {
$str = '/'.$i;
$font = 2;
@@ -20,4 +20,4 @@ ImageGIF($im, 'tmp/'.$i.'.gif');
//for i in tmp/*; do convert -rotate 90 $i img/`basename $i`; done
}
}

BIN
img/0.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 64 B

BIN
img/1.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 63 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 72 B

BIN
img/100.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

BIN
img/101.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

BIN
img/102.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

BIN
img/103.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 B

BIN
img/104.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

BIN
img/105.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

BIN
img/106.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

BIN
img/107.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 B

BIN
img/108.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

BIN
img/109.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 72 B

BIN
img/110.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

BIN
img/111.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 B

BIN
img/112.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

BIN
img/113.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

BIN
img/114.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

BIN
img/115.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

BIN
img/116.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

BIN
img/117.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

BIN
img/118.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

BIN
img/119.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 74 B

BIN
img/120.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

BIN
img/121.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

BIN
img/122.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

BIN
img/123.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

BIN
img/124.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

BIN
img/125.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

BIN
img/126.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

BIN
img/127.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

BIN
img/128.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 75 B

BIN
img/2.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 78 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 77 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 76 B

BIN
img/3.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 65 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 76 B

BIN
img/33.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/34.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

BIN
img/35.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

BIN
img/36.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/37.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

BIN
img/38.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/39.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/4.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 64 B

BIN
img/40.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

BIN
img/41.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

BIN
img/42.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

BIN
img/43.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

BIN
img/44.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

BIN
img/45.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/46.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

BIN
img/47.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

BIN
img/48.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

BIN
img/49.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

BIN
img/5.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 65 B

BIN
img/50.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

BIN
img/51.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

BIN
img/52.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/53.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/54.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

BIN
img/55.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/56.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/57.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

BIN
img/58.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

BIN
img/59.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/6.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 66 B

BIN
img/60.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

BIN
img/61.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

BIN
img/62.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
img/63.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

BIN
img/64.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

BIN
img/65.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

BIN
img/66.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

Some files were not shown because too many files have changed in this diff Show More