Skip to content

Commit

Permalink
Merge pull request #3 from Windows-CPP/beta
Browse files Browse the repository at this point in the history
Full Vers v0.5 Beta-Main Update
  • Loading branch information
Windows-CPP authored Oct 28, 2022
2 parents a2219f4 + b8ea3ba commit 95cbb50
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 41 deletions.
Binary file added images/IM-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/IM-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/IM-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions keys.jsonc

This file was deleted.

59 changes: 27 additions & 32 deletions lockbox_main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# LockBox | Windows NT Standalone Edition

# Imports
from json import load
from time import time, sleep
Expand All @@ -7,6 +9,7 @@
from PIL import Image as imge

# General Variables
tempstr = ""

# Coloured Text Variables
CEND = "\33[0m"
Expand All @@ -27,24 +30,8 @@ def decrypt_dat(location, key):
# Read from settings.json, and print collected imageLoc data to terminal
print("LockBox::Action::Starting::Reading//settings.jsonc")
print(CBLU + "LockBox::Action::Starting::ReadData//settings.jsonc: " + CEND)
jsFL = open('settings.jsonc', 'r')
jsAR = load(jsFL)
setImp = []

temp = (randint(1, 3))

for item in jsAR:
details = {"imgLoc_1":None}
details["imgLoc_1"] = item["imgLoc_1"]
setImp.append(details)
for item in jsAR:
details = {"imgLoc_2":None}
details["imgLoc_2"] = item["imgLoc_2"]
setImp.append(details)
for item in jsAR:
details = {"imgLoc_3":None}
details["imgLoc_3"] = item["imgLoc_3"]
setImp.append(details)
from settings import imgLoc_1, imgLoc_2, imgLoc_3
setImp = (imgLoc_1 + " || " + imgLoc_2 + " || " + imgLoc_3)

print(CGRN + str(setImp) + CEND)

Expand All @@ -54,7 +41,7 @@ def decrypt_dat(location, key):
for i in range(1000):
temp = randint(1, 3)
numList.append(temp)
print("LockBox::Action::Starting::PixelRand//NumList[]:")
print(CBLU + "LockBox::Action::Starting::PixelRand//NumList[]:" + CEND)
print(CGRN + str(numList) + CEND)
temp = randint(1, 1000)
imgNum = numList[temp]
Expand All @@ -64,29 +51,37 @@ def decrypt_dat(location, key):
print("LockBox::Action::Starting::PixelDet//PixelCount")
# opening images for use
if(imgNum == 1):
image = imge.open()
image = imge.open(imgLoc_1)
elif(imgNum == 2):
image = imge.open()
image = imge.open(imgLoc_2)
elif(imgNum == 3):
image = imge.open()
image = imge.open(imgLoc_3)

width, height = image.size

width, height = image.size()
print("LockBox::Action::Starting::PixelDet//PixelCount:")
print(CGRN + str(width*height) + CEND)
print(CBLU + "LockBox::Action::Starting::PixelDet//PixelCount:" + CEND)
print(CGRN + str(width*height) + " (" + str(width) + "x" + str(height) + ")" + CEND)
# getting colour data randomly from the images, putting into array
colourSTR = ""
for i in range(100):
ranWI = randint(1, width)
ranHI = randint(1, height)
for i in range(512):
ranWI = randint(1, (width - 1))
ranHI = randint(1, (height - 1))

image_pix = image.convert('RGB')
r, g, b = image_pix.getpixel((ranWI, ranHI))
colourSTR += (r + g + b)
colourSTR += str((r + g + b))

print(colourSTR)
print(CGRN + str(colourSTR) + CEND)

print("LockBox::Action::Starting::PixelFinal//FinalList")
finalList = ""
for i in range(256):
temp = randint(1, len(colourSTR))
temp = randint(1, (len(colourSTR) - 1))
char = colourSTR[temp]
finalList += char
finalList += char

print(CBLU + "LockBox::Action::Starting::PixelFinal//FET_Pin:" + CEND)
for i in range(4):
temp = randint(1, 256)
tempstr += finalList[temp]
print(CGRN + tempstr + CEND)
5 changes: 0 additions & 5 deletions settings.jsonc

This file was deleted.

3 changes: 3 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
imgLoc_1 = "./images/IM-1.jpg"
imgLoc_2 = "./images/IM-2.jpg"
imgLoc_3 = "./images/IM-3.jpg"

0 comments on commit 95cbb50

Please sign in to comment.