#programming

1 messages · Page 11 of 1

brazen eagle
#

What does it do?

nocturne wadi
tranquil flame
#

But you'd still have to indent?

#

That's the only thing I don't like about Python syntax

nocturne wadi
#

Someone downloaded my extension lol

tulip sail
#

Even for languages which don't require indentation, it's so much more readable

tranquil flame
#

I do indent I just like having autonomy of where I do it

#

It's not baked into the syntax like python or a makefile

tulip sail
#

I mean, fair, but honestly doing it whenever you're changing context or scope makes sense anyway 🤷‍♂️

#

Yes, freedom is good, but does it really matter when the enforced practice is actually the one you'd probably follow anyway? kekw

brazen eagle
#

K&R style best style

hollow sorrel
tulip sail
#

LMFAO

#

Just write in brainfuck and be done with it

vestal dock
#

Hello is there someone who knows c#

lilac holly
#

For sure, just ask your question and maybe someone will answer

vestal dock
#

Uhm is helper.GetFromConsole a specific library or a toolkit?

#

Ist not a class so I can't run it

brazen eagle
rapid plank
#

How can I read the file path from a file descriptor? I can't use fcntl with F_GETPATH since that is macOS only.

surreal bronze
#

what language?

nocturne wadi
rapid plank
#

In C

#

I'm sorry

#

Please do not recommend people answers from chatgpt. This method is dirty and prone to race conditions

true pumice
#

We don't suggest ChatGPT here @nocturne wadi

rapid plank
#

Thanks

nocturne wadi
#

Oh

nocturne wadi
#

C outputting is so much more complicated than C++

#

I just want it to output “2” but it outputted a file named two with all my command line args?!

surreal bronze
inland hazel
#

spooky but neat

#

would want something that does something similar to this without connecting to the internet to fetch data but that is probably not happening with the popular LLM:s

whole yacht
#

true. I would start considering using llms if that happens but currently they are focused on how to gather every piece of data to make it even work.
Be evil first before thinking is their motto imo.

inland hazel
#

well there are some free open source llms that you can use locally

#

the problem is their quality is not really as good

whole yacht
#

I tried out GPT4All with Mistral model before and well it is not great.

nocturne wadi
rapid hound
#

Hello I got a question

If I want the output in Java to be like this

My name is "fares"

#

Like I need the " " around the word fares

#

What should the command be ?

inland hazel
#

you would have to escape the double quotes

rapid hound
#

U mean like this ?

#

Isn't there a way to make it
"fares" instead of

inland hazel
# rapid hound

no not like that... using \ to escape the problematic characters

nocturne wadi
#

What shadow means is the string looks like this \”fares\” , this prevents the quotes from being processed as code and instead are only processed as chars

rustic briar
#

if you havent figured out by now 😄

rapid hound
#

Thank you alot guys I really appreciate

nocturne wadi
#

course

rapid hound
#

And sorry for late response I was driving

#

Just got home

nocturne wadi
#

Good for you(not texting whilst driving)

rapid hound
#

Yes 🫡

nocturne wadi
nocturne wadi
nocturne wadi
jovial cypress
brazen eagle
nocturne wadi
#

VSCode for life

#

Never used anything else and probably wont unless i really have to

#

Ig i use nano sometimes

ebon cliff
#

on Windows, UltraEdit

#

on Linux, nano or mousepad

surreal bronze
#

on windows, Nano & VS-Code

lilac holly
inland hazel
#

the vim and emacs motions can speed up your coding a lot when programming

tranquil flame
#

For small scripts vim just feels good

surreal bronze
#

Or in my case, severely slow me down due to my lack of vim knowledge kekw

surreal bronze
#

What's up, whats the issue?

sinful dome
surreal bronze
#

I don't understand what the issue is here, this code is valid

sinful dome
#

and also remove viruses

surreal bronze
# sinful dome and also remove viruses

Great question, and one which people have been trying to create solutions for continuously - I have no experience in AV so you'll have to do your own research on that I'm afraid

surreal bronze
sinful dome
#

i have another problem!

weary prawn
#

I was working on extracting saved wifi passwords on windows, I don't have a windows machine though. can anyone using windows complete the code for me. I need it to use low level access and not something like netsh wlan show profile...

true pumice
#

Hey @sinful dome

Malware discussion is limited to the advanced channels.
Please make sure you are not breaking our community rules regarding unethical behaviour and sharing malicious files is also against Discord's terms of service.

Furthermore, I am going to have to ask you to refrain from asking for help regarding your "goodvirus" project because we do not condone the creation of viruses, wehether you're writing an antivrius along with it or not.

onyx merlin
weary prawn
#

what do you guys mean by adv chs

tribal juncoBOT
weary prawn
#

what if I have other certs to prove I'm experienced

surreal bronze
weary prawn
#

from coding sites, hackerank, leetcode, codeforces

lyric mirage
#

These aren't quite the same as OSCP etc.

weary prawn
#

look you guys use what we create. sites I shared show my level of expertise in coding

lyric mirage
#

Sorry, point still stands.

weary prawn
#

absurd that you won't let discussions go on here, what's the difference

lyric mirage
#

New users may try out discussions and damage their computer.

weary prawn
true pumice
# weary prawn absurd that you won't let discussions go on here, what's the difference

The key difference is that we need to ensure your commitment to cybersecurity. Discord has strict rules regarding malware discussions, which is why we maintain high standards as well. True cybersecurity professionals typically pursue recognised certifications rather than just on the ones you get for completing the courses on coding websites. Investing in certifications like OSCP demonstrates a serious commitment and qualification in the field.

weary prawn
true pumice
nocturne wadi
#

silly goose ngl

sinful dome
# true pumice Hey <@1140927622587629638> Malware discussion is limited to the advanced chann...

Am not making any sort on malware but am making a anti-virus that is a anti-virus and a virus at the same time. (and my goodvirus project is just 50% virus and 50% anti-virus. I do not create any malware, spyware, adware, etc. and yes goodvirus is not any malware or virus. it is just a anti-virus. it just goes into the MBR (master-boot-record) and delets any instance of virus it finds there. and it is not a virus it is a duel propose virus (and i mean that it is a virus and a anti-virus))

#

and yes goodvirus does not harm any computer'

magic falcon
sinful dome
brazen eagle
ebon cliff
#

I've heard of such things before. "Malware" that mass secures and disinfects.

Better to keep such things as opt-in tools as opposed to something that self-propagates

wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle (current: #11 - 571)

brazen eagle
golden lichen
#

Try the whole location

#

@lilac holly

lilac holly
#

Wdym?

golden lichen
#

instead of ./password.txt

#

/path/to/password.txt

#

for example, /home/kali/Desktop/password.txt

mossy pumice
#

@lilac holly if the file is in the same directory you can omit ./ and just use the file name . Also you can use python raw string for paths

lilac holly
#

Okay, thanks guys.

distant musk
#

I have a question: Why does it take so many years to learn a programming major at university, even though learning a programming language takes only a few months?

#

maybe its stupid question

#

but i want to know

nocturne wadi
magic falcon
tranquil flame
#

In our courses generally the language is used as a supplement to the concept they are trying to teach you. For example we used Java in our OOP course and Risc-v in our architecture course because those languages lend well to what they are trying to teach

brazen eagle
nocturne wadi
#

Its also understanding that you cant just throw your computer at the wall, youll want to do that sometimes

distant musk
nocturne wadi
#

They would probably teach you loops yes but mostly it will be learning how to properly tell the computer what you want

ebon cliff
#

I do find that programming only teaches you the basics. the most common "built-in" functions. To get good at it you need to consult the manual and go far beyond what you were taught for practical usage. But it gets easier each time you do it

#

All languages have for loops and if statements. Once you know one language, you will have a much easier time transferring to any other language

distant musk
#

what is the difference between char and string?

and why char only store a single character? i'm talking about c++

frosty totem
ebon cliff
#

I do not miss pointers

willow anvil
#

I'm planning to buy a book for python by author Eric Matthes is it good

willow anvil
#

Yeah

#

I planned to buy it

vast adder
#

this is 3rd edition. not sure is there more. but if you buy books. humblebundle is site where ppl look for that kind of books

vast adder
sonic axle
distant musk
#

Are there too many things in C++? When I learn the basics of a programming language like C++, do I consider that I have learned everything in the basics? Are there more things in C++?

ebon cliff
nocturne wadi
distant musk
#

There is a huge amount of keywords in C++?

nocturne wadi
#

Not really unless you use libs

#

Its about the same as like JS or Python

magic falcon
distant musk
magic falcon
#

as a reference tool, cpp-reference is way better. If you are new to programming, the structure from w3school may suit your need better.

surreal bronze
#

If it's anything like it is for python, I wouldn't recommend w3schools

distant musk
#

i just want learn the baisc

tranquil flame
nocturne wadi
sinful dome
#

am making a game where the person needs to ACTUALLY hack the game to win the game

#

just wait for a moment

#

....

#

its almost done

hushed mica
#

@sinful dome What manner of hacking? Is it an in-game mechanism, or do you mean you actually have to poke stuff to win?

digital dove
brazen eagle
#

At the very least it's non intuitive

tranquil flame
#

There was that one defcon badge with a similar ish concept

sinful dome
sinful dome
#

am deleting that

#

whatever i create sucks

#

😦

tulip sail
# sinful dome whatever i create sucks

Nah, there are games designed for this exact purpose. Will try to remember the name of one we did a workshop with years back.
Was good fun, although obviously only relevant to hackers

dusky vortex
wispy kestrelBOT
#

Gave +1 Rep to @nocturne wadi (current: #238 - 22)

nocturne wadi
sonic axle
nocturne wadi
#

I use nano cuz im a silly goose

sonic axle
#

Vim is goated vim

#

(I just learned how to exit vim so I think I'm a god xD)

inland hazel
sonic axle
inland hazel
#

ah

nocturne wadi
#

kek kek

#

I think its esc and :wq for me

inland hazel
#

mostly ZZ or ZQ for shadow

#

ZZ is save and exit

#

ZQ is exit without saving

sonic axle
ebon cliff
whole yacht
frosty totem
nocturne wadi
#

How is [] != []

frosty totem
# nocturne wadi How is [] != []

My understanding is that if both sides are JS object references, it compares the memory addresses of them. And using [] a second time in code is a new object

#

This would return true instead:
let a = [] let b = a a == b

#

This is also false for that reason:
let a = {text: "abc"} let b = {text: "abc"} a == b

whole yacht
#

wack js

nocturne wadi
#

On the topic of JS

brazen eagle
#

Gods JS typing is really really weird

brazen eagle
#

Primitive types are usually assigned/passed by value, objects will use references. You have 2 separate object definitions so 2 separate references

brazen eagle
magic falcon
proven talon
# magic falcon aren't primitive types still objects? everything should be an indirect reference...

That's not a Python. According to docs, primitives are not objects and all of them are immutable. https://developer.mozilla.org/en-US/docs/Glossary/Primitive

MDN Web Docs

In JavaScript, a primitive (primitive value, primitive data type) is data that is not an object and has no methods or properties. There are 7 primitive data types:

brazen eagle
#

references are probably reused for certain objects like empty strings/arrays

#

especially if they're constants

proven talon
# brazen eagle some of them, like strings, are a bit weird

Check out the doc above and you can understand them better. Basically, they are primitives, but appear to have methods/properties, while in reality it's achieved by wrapping them into objects under the hood, that's why they have unintuitive behaviour.

I can say for Python that usually for optimization purposes "a" is "a" (they refer to the same object, so id("a") == id("a")), but it's not guaranteed.

But then again, GC in JS and Python are fundamentally different: Python uses advanced reference counting, while JS uses mark-and-sweep.

nocturne wadi
#

No idea why but i cannot stop laughing at the top

sonic axle
#

The gcc compilor is the weridest thing ever on earth

brazen eagle
#

Also void** is used for laziness

magic falcon
brazen eagle
tranquil flame
#

void pointers are awesome

#

in C

#

in assembly they are a pain even though the one I was working with had all pointer as void

brazen eagle
#

Had some trauma with a set of libs that over abused void pointer pointers

#

Some calls had void pointer pointer pointers

magic falcon
#

sounds about right

#

old C is amazing in it's compactness

digital dove
distant musk
#

How do programmers know the tasks required of them and how do they even upload scripts?

frosty totem
brazen eagle
# distant musk How do programmers know the tasks required of them and how do they even upload s...

For the former, there's usually a requirements gathering phase in the software development lifecycle. This lets us know more or less what the stakeholder needs and kicks off the design phase. There are many different processes to actually develop the software that I won't get into here. As for the latter question, these days it usually git that's used as version control and eventually storage, generally with a platform like GitHub or gitlab.

clear lodge
#

praise the lord for PMs and POs

brazen eagle
distant musk
magic falcon
#

No. All those companies are required by law to enact specific practices regarding source code management to prevent anyone from doing that.

frosty totem
#

You have no way to circumvent those checks.

fossil brook
#

Here is only programing in programing Languages or in engines too

brazen eagle
#

see the XZ debacle

nocturne wadi
stark summit
brazen eagle
stark summit
#

indeed they are. I am kind of always confused when i see their documentation

stark summit
brazen eagle
stark summit
wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle (current: #12 - 572)

brazen eagle
lilac holly
#

I'm trying to do something like:

Select * from table( ols.package.function(param1, param2))

I'm trying do this in SQL advanced section of Powerbi when using DB connector.

From what I've read this should be possible but its basically giving "Invalid Identifier" .

The few examples I saw seemed to use PLSQL directly to used a stored procedure in Powerbi but that didn't work for me either.

Honestly I'm looking for even a basic example of this but seems hard to find.

It seems to me to not even be recognizing the packages or functions at all.... even in view hierarchy I only see tables.

true pumice
#

@nocturne wadi please do not post harmful commands even if they are in screenshots (as per the rules)

nocturne wadi
#

Oh sorry

#

I have a meme to replace that one then

nocturne wadi
#

Hey everyone i need some help, im coding a small project in C++ however its now 17.78kb of code. Its hard for me to properly understand whats happening, ive already sorted relevant things into two headers but it still feels like so much. How are yall dealing with this?

brazen eagle
#

Split up everything that can be

brazen eagle
brazen eagle
nocturne wadi
nocturne wadi
pliant wyvern
# nocturne wadi wdym split it up?

Split it up into certain "Functions" , they arent actual programmed functions, but if you put like

// This Sec of code (127-130) does X, Y, Z, and A

CODE (x3)

// This next sec of code (131-###) does X, Y, Z

#

it makes it a lot easier to read

#

so anything that connects, put it together

wispy kestrelBOT
#

Gave +1 Rep to @pliant wyvern (current: #2090 - 1)

nocturne wadi
#

Also thanks hydra

pliant wyvern
#

yeah ofc

pliant wyvern
tribal juncoBOT
pliant wyvern
#

THANK YOU

nocturne wadi
#

Haha

pliant wyvern
#

W

brazen eagle
# nocturne wadi wdym split it up?

Functions, classes, etc. the organization is really up to you, but rule of thumb is one responsibility = one class. Don't try to make things do too much, avoid embedding if/else blocks

hardy sinew
#

I found something interesting for the people curious about Quantum Technologies and more specifically Quantum Programming with Python. This workshop starts next week, but similar workshops are hosted somewhat regularly. You also get a certificate once you complete it. Maybe not super useful for hacking and CTFs now, but possibly in the near future

https://qworld.net/qbronze135/

nocturne wadi
#

Trying to store data as binary here, storing works fine however whenever i load i end up with ~20000 health even though i saved with 10. Also even if the save file is empty i still get a blank name and ~20K health. I tried googling but cant find anything like this. Anyone help here?

    std::ifstream file(filename, std::ios::binary);
    if (!file) {
        std::cerr << "Error opening file for reading: " << filename << std::endl;
        return;
    }
    
    Player& player = game.player;

    // Deserialize player
    size_t nameSize;
    file.read(reinterpret_cast<char*>(&nameSize), sizeof(nameSize));
    player.name.resize(nameSize);
    file.read(&player.name[0], nameSize);
    file.read(reinterpret_cast<char*>(&player.health), sizeof(player.health));
    file.read(reinterpret_cast<char*>(&player.damage), sizeof(player.damage));
    file.read(reinterpret_cast<char*>(&player.level), sizeof(player.level));

    // Deserialize player inventory
    size_t invSize;
    file.read(reinterpret_cast<char*>(&invSize), sizeof(invSize));
    player.inventory.resize(invSize);
    file.read(reinterpret_cast<char*>(player.inventory.data()), invSize * sizeof(int));

    // Deserialize items
    deserializeItem(player.sword, file);
    deserializeItem(player.shield, file);
    deserializeItem(player.greaves, file);
    deserializeItem(player.chestplate, file);

    // Deserialize player experience
    file.read(reinterpret_cast<char*>(&player.exp), sizeof(player.exp));

    // Deserialize player additional fields
    file.read(reinterpret_cast<char*>(&player.healthMax), sizeof(player.healthMax));
    file.read(reinterpret_cast<char*>(&player.weight), sizeof(player.weight));

    // Debug output
    std::cout << "Loaded game data:\n";
    std::cout << "Name: " << player.name << "\nHealth: " << player.health << "\nMax Health: " << player.healthMax << "\nWeight: " << player.weight << "\n";
}```
#

oh and also none of the couts go off

brazen eagle
#

Also this looks vulnerable to a buffer overflow

#

At first glance anyway

frosty totem
nocturne wadi
#

yeah c++

nocturne wadi
#

Like just a char[] or what?

brazen eagle
nocturne wadi
#

Wdym the range?

brazen eagle
#

Range of possible values

#

Tbf char is interpreted a bit weird by the compiler

nocturne wadi
#

Well it increases at any given time due to leveling up

#

But it starts as 10

brazen eagle
nocturne wadi
#

And is just an int

brazen eagle
#

Then cast to an int, preferably unsigned

nocturne wadi
#

Ok it can be unsigned yeah

brazen eagle
#

You should be able to use a struct as well no?

nocturne wadi
#

So just reinterpret_case<int*>?

#

cast*

brazen eagle
#

Also check to see if any serialization libraries exist for c++

brazen eagle
nocturne wadi
#

So preferably find a lib?

#

Well thanks a lot hydra!

#

Very helpful

brazen eagle
#

Look up Boost

#

It has a tonne of useful libs

#

Many of which have been integrated into the language

nocturne wadi
#

"1,2" never prints???

        cout << "1";
        ifstream file; cout << "1,2";
        file.open("savegame.dat", std::ios::binary); cout << "1,3";
        /*if (!file) {
            cerr << "Error opening file for reading: " << filename << endl;
            return;
        }*/
        cout << "2";
        cereal::BinaryInputArchive archive(file);
        archive(game);
        cout << "3";

        // Debug output
        const Player& player = game.player;
        cout << "Loaded game data:\n";
        cout << "Name: " << player.name << "\nHealth: " << player.health << "\nMax Health: " << player.healthMax << "\nWeight: " << player.weight << "\n";
    }```
#

no compiler or run time errors

#

1 prints fine

#

But it just says nah ima stop right here

#

If someone wants to help theres the src

#

NEVERMIND

#

I FIXED IT

#

apparently it was because i uhhh...

#

wasnt calling the loadSaveGame() function...

#

like at all...

#

Hours of my life wasted

brazen eagle
whole yacht
#

that's really unfortunate.

tranquil flame
#

happens to the best of us

nocturne wadi
#

How can i prevent a double from overflowing? Getting an FPE and i suspect thats the problem

#

in c++ specifically

#

wait nevermind

brazen eagle
#

You probably aren't going high enough to overflow a double

sonic axle
#

Hey I have a question if Possible from the code below I'm trying to cycle into the users input until I find a whitespace then it replace it with a new line char
But When I give it more than 9 < chars it doesn't cycle at all

frosty totem
frosty totem
#

I meant the code

sonic axle
#

it is above xD?

#

printing-tokens.c

frosty totem
sonic axle
#

oh you are on phone I see

#

here you go

frosty totem
#

I don't understand the line with int len=

#

sizeof(s) gives you the size of a pointer on that architecture AFAIK. Is that intended?

sonic axle
#

yep I wanted to mesure the size of the array to cycle trought it (even tho I changed it with 100 to test it)

frosty totem
#

But sizeof(s) will just return 4 or 8 (bytes), the size of a pointer. I don't understand the logic behind that line.

#

Someone correct me if I'm wrong please.

magic falcon
#

He's attempting to get the number of elements in the dynamic array. But len is never used, so it's just a waste of operations.

frosty totem
magic falcon
#

he's trying to divide the bytes of the array by the size of an element

frosty totem
#

That's a fixed value on a given system, independent of the length of the input.

magic falcon
#

Yes, bad implementation.

frosty totem
#

Ok thanks for confirming that.

magic falcon
#

I saw a lot of this kind of thing when I was a GTA for an OS course at university

frosty totem
#

So if in the example output on the screenshot the erroneous len calculation was used that explains the behavior.

#

The loop is only gonna run 8 times (on a 64 bit system).

#

So it replaced the first two whitespaces with newlines and then left the rest untouched.

#

@sonic axle I think I found the problem.

sonic axle
wispy kestrelBOT
#

Gave +1 Rep to @frosty totem (current: #69 - 95)

sonic axle
#

as Juun said I did a bad implementation and fixed it

#

and It did pass all the test cases thanks too @magic falcon

magic falcon
#

was this homework?

sonic axle
#

No a challenge on hackerrank

magic falcon
#

Generally we frown upon asking for help with competitive challenges, sites, coursework, and professional tasks

sonic axle
#

I'm not seeking a solution handed to me. There are many resources online where this particular challenge has been solved, and I'm merely seeking guidance to set myself on the right track. Additionally, HackerRank itself encourages seeking help when stuck, as it fosters learning and problem-solving skills

magic falcon
#

that's fine, so long as it isn't a competitive challenge

carmine pumice
#

Is there someone who has experience running programs from start in Linux who can help me? I'm trying to get my computer to automatically change the function of one of my keys using the systemd service, but it doesn't seem to be running properly.

frosty totem
carmine pumice
#

Thanks for the tip about the status, looks like the code did indeed fail. I'm new to Linux, so trying to sort this out

frosty totem
carmine pumice
#

So I think it's just something wrong with the shell or the service

frosty totem
#

Do you get an error if you manually run the script?

carmine pumice
#

If I run that command in a terminal, it does what it's supposed to do (turns one of my keys into a shift key), but if I use systemctl keyswap.sh, nothing happens

frosty totem
#

I meant if you run the script manually

#

/usr/local/sbin/keyswap.sh

#

Did you make it executable with sudo chmod +x?

surreal bronze
#

Just use Journalctl to view the logs

#
journalctl -eu keyswap
carmine pumice
carmine pumice
surreal bronze
#

Huh 🤔

surreal bronze
carmine pumice
#

@surreal bronze

#

I think the chmod must not have stuck, when I tried to run /usr/local/sbin/keyswap.ch it said I didn't have permission

surreal bronze
#
xmodmap unable to open display ''
#

That's the error you're getting, need to query that in a search engine

frosty totem
#

You can check that with ls -l. What permissions does it show for the script?

surreal bronze
#

It's able to run the keymap.sh script, that's not the issue

frosty totem
surreal bronze
#

Yep, but never seen that error before so wouldn't know where to continue from now - I can see a couple posts on stack exchange about it, so that's where I'd start Matty

carmine pumice
#

Again, new to Linux still, but this means read/write/execute for the User, right?

frosty totem
carmine pumice
#

OK, thank you both. Let's see what it has to say...

frosty totem
#

My guess it has to do with dependencies during boot. Wrong order somehow.

#

Can you share the output of this please

#

systemctl list-units --type=target

frosty totem
#

In your unit file try replacing
After=multi-user.target
with
After=graphical.target

#

Then run
sudo systemctl daemon-reload

#

And test if it works now.

carmine pumice
#

Okies, I'll give that a try

frosty totem
#

If that doesn't work try the same but with Requires= instead of After=.
I believe that's more accurate anyways. After more reading not sure about that anymore. Worth a try.

carmine pumice
#

Ok, weird...I ran the keyswap.sh in the command line just to see if it works, and it works in the command line (the button capitalizes now), but it's not working here in Discord

frosty totem
#

Ok but that's a different issue

carmine pumice
#

Is there a better way to test if the service is working ok without just restarting the computer?

frosty totem
carmine pumice
#

Ok that's what I did but it didn't seem to do anything. I'm gonna restart and see what happens

#

No love there. Let's try the Requires

frosty totem
#

Wait

#

It could be interesting to see if the error in the journal changed

#

sudo journalctl -eu keyswap

#

Also worth trying
WantedBy=graphical.target
instead of
WantedBy=multi-user.target

I honestly don't know how exactly systemd processes these instructions so it's more trial and error.

carmine pumice
frosty totem
#

I don't wanna keep throwing ideas at you without knowing whether they work. But that's the best I can do, sorry.

carmine pumice
#

You're being very helpful. Any ideas are good ones, if for no other reason than it makes me go "Hmm, why that?" and try to figure it out

frosty totem
#

You could try doing it as a cronjob, avoiding the whole systemd.

#

crontab -e

#

And then add a new line to the end of the file

#

@reboot ABSOLUTE_PATH_TO_SCRIPT

#

Then save.

carmine pumice
#

It's funny, this whole time I was researching all this, I was wondering why cron wasn't the thing that people went first to. Why mess with systemd when it seems like cron's job is to run things automatically

frosty totem
#

I just don't know when this will get executed. If it's late enough for your command to work

#

In the boot process

carmine pumice
#

I assume Cron is one of the last things to load and run, right?

frosty totem
#

I would also assume that.

#

But assumptions...

carmine pumice
#

Do I have to include sudo in a cron table, or does cron have root permissions?

frosty totem
#

If you run sudo crontab -e I think everything in there will get run as root automatically

carmine pumice
#

Yah, I did that to be safe

carmine pumice
#

Somehow my script has started turning off my comma key entirely. I'm pretty sure it didn't do that before, but I haven't made any changes to it either. And I don't understand why

carmine pumice
#

Yay, I fixed that part at least. Still no idea how to deal with the crontable not loading at reboot

frosty totem
#

If you ever figure it out please share how, I'm curious.

lyric mirage
carmine pumice
lyric mirage
carmine pumice
#

This should make it executable by the system, right?

#

Sorry, yes, I chmod it and that's the permissions now

frosty totem
#

You could add a second line to the keyswap.sh

touch /tmp/marker

If you reboot and the file exists at least you know your script executed.

carmine pumice
#

The idea being to reboot and then go check the tmp to see if the marker is there?

carmine pumice
#

Great. Sorry for the rudimetary question, just making sure I'm getting the theory right

frosty totem
#

Desperate situations call for desperate measures

carmine pumice
frosty totem
#

Must be what you initially already thought, something with the shell environment. So we haven't really moved forward.

Maybe ask in a linux discord or on stackexchange where the linux pro's hang out

carmine pumice
#

Do I have to put sudo infront of it, even though the .sh is from root itself? But that wouldn't really make sense, cuz then why would it make the marker

frosty totem
#

You can also check the permissions of the /tmp/marker file

#

If it's owned by root you know the script was executed by/as root

carmine pumice
#

It's definitely owned by root, I can't do anything with it when I'm not logged in as root. Hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

carmine pumice
#

Ok, so I think I determined that part of the problem is that cron is used for user crons, but if you want to make a system cron, it must go in /etc/cron.d/ I'm still having the issue of it not working on reboot, though.

frosty totem
carmine pumice
frosty totem
# carmine pumice We established that the crontab ran on startup because the marker was placed, bu...

If you edit the crontabs file with sudo crontab -e instead of crontab -e it will run everything with root. If you use crontab -e it will run as the current user. That's why the marker file had root:root ownership, because it was created by root.

You can add another line to your script to double check this:
id > /tmp/id_test

After a reboot you will have a file /tmp/id_test showing that it was executed as root in fact.

#

The file is gonna look similar to this

uid=0(root) gid=0(root) groups=0(root)
carmine pumice
#

Yah, I know that the cron was run by root cuz the marker was made by root, but the cron page says that cron.d is for system jobs (for more than one user)

I suppose that doesn't mean that the shell can't be run out of cron -e, it just means it would only affect one person?

frosty totem
#

Ok I thought you were still talking about permissions.

#

It might be something with shell environment variables or login shell vs. non-login shell. But since I don't know how xmodmap works, that's all just wild guesses.

carmine pumice
frosty totem
lilac holly
#

has anyone tried digging through the Linux kernel’s source code (towards a specific section)?? I find it overwhelming at times since the man page didn’t explain everything, about the scheduler.

carmine pumice
hollow sorrel
#

You changing the function of your keys would go to a corresponding profile like .bash.profile or .bashrc, etc.

#

So it becomes persistent.

#

If youre doing it for all users, you should edit the corresponding profile under /etc/skel/

eager gulch
#

I'm a beginner level coder in python. Can I ask some really basic python questions here and maybe get some code review?

surreal bronze
#

Go for it

brazen eagle
restive hedge
frosty totem
#

Especially if running with higher privileges.

brazen eagle
#

Half the time it's explanations are useless for me, as it's not telling me anything new

frosty totem
brazen eagle
brazen eagle
#

Not saying don't use it, just be wary, and be able to validate against other sources

lyric mirage
#

Please don't post dangerous commands, even in the form of a screenshot.

#

I wasn't present of them, or they'd be told too.

#

For them*

steady cloud
tranquil flame
#

I wouldn't recommend it for learning simply because there is much better and more accurate resources

lilac holly
#

Is anyone here interested in crypto virology?

sweet harness
#

hi,anyone up to discuss algorithms and branches of coding

#

i know java,python and lua

#

all mastered so reach out if you need tips

#

no one active today shit.

sweet harness
tired fox
tired fox
paper yew
#

can anyone help me with information on how to build a webcrawler
or to scrape a website using python

#

for my school project and this is for ethical purpose only

lyric mirage
paper yew
#

what do you help with

lyric mirage
#

Ethical and legal matters.

We don't help with unethical, illegal, or school/Uni/work.

paper yew
#

help me for ethical hacking purpose then

lyric mirage
lyric mirage
paper yew
lyric mirage
#

Good luck with your project.

paper yew
wispy kestrelBOT
#

Gave +1 Rep to @lyric mirage (current: #1 - 2406)

lyric mirage
#

@daring nova No self advertising please without engaging with the community more.

daring nova
lyric mirage
fiery tiger
#

Helo are there anyone who know Ruby ?

frosty totem
fiery tiger
# frosty totem Better to just ask your question

I'm working on CTF challenges, and when I connect to a given IP address, it returns an output. Any data I enter is returned back as output. I found background code running with OSINT, but I don't know Ruby, so I can't perform code injection. I'm looking for someone who can help me with this.

fiery tiger
#

Yeah

lyric mirage
#

Then we can't help, sorry.

That would be cheating.

fiery tiger
#

Okay thanks

stiff basin
#

Hello guys

stiff basin
fiery tiger
wispy kestrelBOT
#

Gave +1 Rep to @drowsy pelican (current: #294 - 17)

fiery tiger
bright mountain
#

Anyone good at C# i can DM? ty

brazen eagle
bright mountain
#

i tried different way to compile the SimpleService.Designer.cs but nothing seems to work.
Keep me giving different types of error

#

Im asking this not for personal purpurse but becouse im going through ||Osiris Room|| Once again

#

so if anyone can help me with this compiling , ty

raw bay
#

when a html input has a defined size and maxlength of x, is everything bigger getting cut? like max is a string of 10 and i enter a string of 12, so just just first 10 characters are getting processed?

frosty totem
wispy kestrelBOT
#

Gave +1 Rep to @frosty totem (current: #49 - 151)

tulip sail
# raw bay when a html input has a defined size and maxlength of x, is everything bigger ge...

Just remember that's a client side control only. It's up to browsers to respect the maxlength attribute -- most browsers will do that by preventing you from typing any more than the defined limit of characters (e.g., 10).

The server, however, doesn't see or respect that attribute. You need to have server side filtering as well, or it's possible to basically ignore the client side limitation

raw bay
wispy kestrelBOT
#

Gave +1 Rep to @tulip sail (current: #9 - 767)

tulip sail
#

Nice one 🙂

vague gorge
#

hey guys
some help, i left vs code for a while and i cant write a C code ...
i tried many things and nothing dose

surreal bronze
#

could you elaborate ?

sonic axle
#

Hey I'm trying to create a Socket and bind it to a port then listen for a connection and respond with 200 OK but as you can see bellow the first request gets ignored for some reason until the second request. how so?

leaden berry
sonic axle
#

lack of sleep is bad ngl yell_cat

proven totem
#

anyone could recommend some good reverse engineering resources like free Books, online courses, or tutorials. Thanks in advance!

sonic axle
inland hazel
#

have fun

tranquil flame
stark summit
#

the math ain't mathing

stark summit
#

im analyzing a bin here is the decompiled code

#

void vuln(void)

{
long in_FS_OFFSET;
char local_48 [48];
int local_18;
long local_10;

local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_18 = 0;
puts("Enter the access code: ");
gets(local_48);
puts("TODO: Implement access code checking.");
if (local_18 == -0x21524111) {
system("/bin/cat flag.txt");
}
else {
puts("Invalid auth!");
}
if (local_10 != *(long )(in_FS_OFFSET + 0x28)) {
/
WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}

#

so, my question is i can see the buffer overflow possibility -> 48 bytes of padding and then pass -0x21524111) (which is DEADBEEF in hex) but when i do pass it with little endian format i get failed auth

Is this because of local_10 = (long)(in_FS_OFFSET + 0x28); ofset?

#

if so then the local_48 var should have 'P'*28 chars and then \xef\xbe\xad\xde

lyric mirage
surreal bronze
#

Really, really, fast and literally zero customisation needed, it just...works...

edgy meadow
#

Is it allowed (i think not) to upload scripts or code files in general?

brazen eagle
#

Depends on source

edgy meadow
stark summit
brazen eagle
stark summit
#

But i am kind of confused. If passed data has to overflow and overwrite the 2nd variable then should that have the stack check fail occur?

stark summit
brazen eagle
#

You're storing input into a 48 byte buffer, shouldn't be too hard to figure out the overflow 🙂

stark summit
#

So my thought process is 48 bytes of padding and passing the deadbeef should work but that doesn't work

#

Im passing it in lottle endian format in hex

brazen eagle
#

You don't want the stack check to fail

stark summit
#

Ok stack check was failing after 56 characters. So like 57 onwards.

brazen eagle
brazen eagle
#

In theory you need 52 bytes

#

And a bit of thinking about how ints are stored

stark summit
brazen eagle
#

Nah the hex should be fine

#

But if ints are stored as little endian in memory, then you might be going at it backwards

stark summit
#

Oh

#

Oh lol now i get it

#

Thanks i will give this a try today

#

Hope i get this right or else. I wouldn't sleep tonight too lol

brazen eagle
#

Experiment 🙂

stark summit
wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle (current: #12 - 581)

stark summit
# brazen eagle Experiment 🙂

i managed to understand the padding and managed get it done with python pwntools. but if i run the same bin and pass it as a string it fails. is there a way for me to pass it so that the bin can parse it?

brazen eagle
#

might be tricky as a string as you can't actually input some of the characters on the terminal. You should be able to redirect a file to stdin though

stark summit
#

yeah guess thats why pwntools is the best

nocturne wadi
stark summit
#

is this fr? lol

inland hazel
#

^ not piracy if it was not clear from the repo descriptions readme.md file

nocturne wadi
edgy meadow
#

Is anyone random interested in a pi project? Its about a botnet detection system combined with an IoT pentesting lab.

tired hawk
#

I'm doing a flutter course and I need to make a mobile app as the final project. It's better if it's a solution to a real world problem since I have to write a project proposal as well. Can you guys give me some ideas for an app? This app won't be deployed as a product and will be open source (most probably)

brazen eagle
edgy meadow
maiden agate
#

Yes I done some projects related to AI using pi & have basic knowledge about pi

edgy meadow
#

But if i could do it with someone of the community it would be cool.

maiden agate
maiden agate
edgy meadow
edgy meadow
maiden agate
maiden agate
edgy meadow
#

Python is perfect.

#

So... honestly i didn't count with someone who's up for.

#

Which timezone is yours or better ur in?

maiden agate
#

UTC +5:30

edgy meadow
#

UTC +1:00

#

Think its possible.

tired hawk
brazen eagle
tired hawk
wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle (current: #12 - 586)

sonic axle
#

People who have Done Competitive Programming:
I know how to code in C and done pretty basic stuff with it.
Should migrate to cpp cz of high-performance and the OOP?

#

or should I stick with C

tranquil flame
#

Performance doesn't really matter for these competitions (there was only one problem I saw that needed less than 5 seconds and that was achievable with python (curse you purple rain)). You also won't be writing neat code for OOP to matter, ur trying to solve the problem at hand, not program

#

That being said go with a language where you are comfortable you can handle most input thrown your way and you know how to handle and play with that input. That's by far the most a language can offer you other than it's built in functions

#

I've placed second in every programming competition I've gone to and python worked completely fine (I did use lisp for one of them as well)

leaden berry
sonic axle
#

that why I was concerned about the performance

sonic axle
edgy meadow
#

Why ppl doin competetive programming? Is it just for fun or a deeper meaning?

leaden berry
edgy meadow
#

And the reason is?

leaden berry
#

Money, fame, entertainment, girls, friends...

#

job opportunities...

#

that sort of things 😄

tranquil flame
sonic axle
#

For now I wont think abt the preformance but rather building a logical thinking and a good aproach to Cp

sonic axle
sonic axle
leaden berry
sonic axle
leaden berry
#

I'm sure somebody has found love at a competitive programming event

sonic axle
leaden berry
#

why not? you saying that hot girls can't be geeks? come on, it's 2024, they can be whatever they want 🙃

sonic axle
#

For me I would just attend solve and go.

#

I dont get paid enough for that shit

leaden berry
#

I've never been there, but I worked with a student once (intern in my old team) who was very much into it

#

and yes, very much an introvert but very kind

#

(and had a gf)

#

kekw

edgy meadow
edgy meadow
leaden berry
magic falcon
#

been awhile since i got to do that kind of interview, it's always fun to watch someone figure out how to manage a threadpool implementation for a specific workload

edgy meadow
sonic axle
sonic axle
#

also another reason is Cp can help with Hacking af.

edgy meadow
sonic axle
#

You know it kinda sounds like a bit

#

of

edgy meadow
#

Here it is more about a degree issue. But maybe u are right tho. Idk cuz they don't reply to any questions.

brazen eagle
leaden berry
magic falcon
grizzled sandal
#

I'm losing my mind... how hard can it be to add a dependency to a Java project ... in VS Code?

hollow sorrel
#

@brazen eagle , our resident java addict can help you more.

grizzled sandal
# hollow sorrel A nightmare

Well any tips?
Even simple implementation 'com.google.code.gson:gson:2.11.0' gets me nowhere - auto completion doesn't kick in when typing Gson

hollow sorrel
#

but imo, i’d use a Java specific IDE instead.

grizzled sandal
#

I use JetBrains' IDEA for everything, but a specific project requires me to use VS Code 🙃

grizzled sandal
#

gradle

brazen eagle
#

look it up on maven central then

grizzled sandal
brazen eagle
#

try running gradle on the cli then

grizzled sandal
#

I'll provide some info:
I have a gradle init-generated project like this:

app
  src
    main
      java
        attempt2
          App.java
  build.gradle
gradle
gradlew
gradlew.bat
settings.gradle

Weird thing is that ./gradlew :app:dependencies shows Gson and other things:

runtimeClasspath - Runtime classpath of source set 'main'.
+--- com.google.guava:guava:31.1-jre
|    +--- com.google.guava:failureaccess:1.0.1
|    +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
|    +--- com.google.code.findbugs:jsr305:3.0.2
|    +--- org.checkerframework:checker-qual:3.12.0
|    +--- com.google.errorprone:error_prone_annotations:2.11.0 -> 2.27.0
|    \--- com.google.j2objc:j2objc-annotations:1.3
\--- com.google.code.gson:gson:2.11.0
     \--- com.google.errorprone:error_prone_annotations:2.27.0

but ./gradlew :dependencies shows nothing:

> Task :dependencies

------------------------------------------------------------
Root project 'attempt2'
------------------------------------------------------------

No configurations

Anyway, ./gradlew run calls :app:run which works. Problem is that auto completion in App.java only works for Java's built-in classes and Guava's Maps, Lists, ..., but not Gson, and it's really frustrating
It's as if the auto completion thingy, whatever that is, didn't load the updated build.gradle

#

build.gradle seems to be set correctly, gradle build wouldn't run if it wasn't:

repositories {
    mavenCentral()
}

dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
    implementation 'com.google.guava:guava:31.1-jre'
    implementation 'com.google.code.gson:gson:2.11.0'
}
brazen eagle
#

dependencies is a bit weird

#

but that should be fine

#

it compiles, yeah?

grizzled sandal
#

yes

brazen eagle
#

are you using the Application plugin?

grizzled sandal
#

yes

plugins {
    id 'application'
}
brazen eagle
#

that should package everything properly as well

grizzled sandal
#

I just added com.google.gson.Gson g; to App.java and that compiled fine as well, but VS Code doesn't notice somehow

brazen eagle
#

yeah I'm not a fan of vscode for Java

grizzled sandal
#

me neither

brazen eagle
#

might want the import I guess?

grizzled sandal
brazen eagle
#

probably doesn't know where to look for libs

#

you have the Java extensions installed?

#

might be a classpath issue?

grizzled sandal
brazen eagle
#

yeah ok

#

dunno then

#

I'd just use intellij tbh

grizzled sandal
wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle (current: #12 - 589)

brazen eagle
#

sorry

#

though if the cli works....

surreal bronze
#

you could disable the error messages if it gets annoying

grizzled sandal
#

works, but auto completion is the necessary bit here, it's much worse without it

#

I'll see if Python works better in VS Code, good thing that's an option here

brazen eagle
#

it should

edgy meadow
#

Yes, py works much better in vs code.

sonic axle
surreal bronze
#

LOL

#

most of those points honestly seems like a skill issue, not genuine flaws with the language

surreal bronze
#

from the same author

sonic axle
sonic axle
thorn cipher
#

If you still call X "twitter" you're basically a fossil

leaden berry
thorn cipher
#

xxxtentacion

leaden berry
#

Must just wanted to name a social media platform after his kid..

thorn cipher
#

Facebook should just be called "book"

#

idk anymore im just rambling nonsense

true pumice
drowsy pelican
nocturne wadi
brazen eagle
#

Not birb site though

stone kayak
# leaden berry It will never be "X"

elon actively deadnames people and has made it twitter policy to allow bullying people with their deadname so i shall always call his silly little website twitter

also to add to the rust discourse i thibk you get the hangover first but after you learn all the likes tricks it feels sooo nice to code with

undone badger
#

Hey guys I created a tool to automatically Grab CSRF Tokens/session cookies to bruteforce logins. Would love to know any improvement/feature suggestions for the project :)
https://www.linkedin.com/feed/update/urn:li:activity:7219080281117327361/

𝐁𝐲𝐩𝐚𝐬𝐬 𝐂𝐒𝐑𝐅 𝐓𝐨𝐤𝐞𝐧𝐬 𝐢𝐧 𝐋𝐨𝐠𝐢𝐧 𝐅𝐨𝐫𝐦𝐬 𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐢𝐜𝐚𝐥𝐥𝐲 𝐰𝐢𝐭𝐡 𝐖𝐚𝐟𝐟𝐥𝐞𝐬𝐅𝐎𝐑𝐂𝐄

While pentesting, I encountered a…

edgy meadow
wispy kestrelBOT
#

Gave +1 Rep to @edgy meadow (current: #407 - 12)

glossy charm
#

Hey guys wanted to ask something,I m using a library there is fixed size defined in the library for shape but I want to change shape in my code dou guys have any clue how can I do that

#

Like there is width ratio which is 1 with line width so if I change line width to 1 it becomes 1 but shapes size it too small almost invisible for it to appear in my chart

#

Any clue how can I achchive this I m using react js

clear lodge
#

If so, last time I used it you can override those values in your theme config, you just need to find the right property

#

Alternatively manually find it in the DOM but you'll probably end up with some shitty selector. Use !important if you really have to but ideally you avoid this

lyric mirage
#

@hot sigil Please engage with the community more before posting things like this.

hot sigil
proud geyser
#

Hi, do you recommend any resource to learn python for pentest? Normally used libraries

edgy meadow
shell pawn
#

hi

lilac holly
#

hi i need to learn javascript because ive heard youll become a super nasa hacker if you know js

fickle barn
# lilac holly hi i need to learn javascript because ive heard youll become a super nasa hacker...

Learn JavaScript basics in 1 hour! ⚡ This beginner-friendly tutorial covers everything you need to start coding.

🚀 Ready to dive deeper?

✋ Stay connected:

▶ Play video
lilac holly
wispy kestrelBOT
#

Gave +1 Rep to @fickle barn (current: #2161 - 1)

proud geyser
nocturne wadi
#

I should learn assembly tbh

#

Ive always wanted to make my own compiler

#

Uh guys wth is C in boolean algebra?

tranquil flame
nocturne wadi
tranquil flame
#

That's just telling you total order and precedence for C operators

nocturne wadi
#

Ah ol

#

ok*

brazen eagle
feral moss
#

Hello guys, i am posting here this topic since it's more programming-related than security things:

I am reading about conversation about what "full-stack" is and many people have different opinions like:

Opinion 1: "Full-stack back in 2005 was to know backend (Java/C/C++/any backend language) + frontend (HTML/CSS/JS/anything that comes with those)"

Opinion 2: "To be a full stack developer in 2022 means that you know how to do everything from devops to visual C in addition to what you use for each project."

Opinion 3: "Fullstack = you do what we ask you in a codebase of 5mill lines of code and in the end you won't learn anything because we don't give you the necessary time to absorb knowledge"

How would you define the term "full-stack" in 2024? Like what should someone know as "core" technologies or anything else that you would like to add.

whole yacht
brazen eagle
#

I think full stack is a stupid term tbh

#

It's more corporate wanting 3 devs and an ops for the price of 1 and possibly a burnout

whole yacht
#

it is indeed a stupid term.

tight pine
#

Full stack to me is someone who can do frontend web, backend web, mobile and manage the db. It's basically everything you'd need to run some e-commerce site.

magic falcon
brazen eagle
magic falcon
inland hazel
nocturne wadi
shell musk
nocturne wadi
brazen eagle
#

Assuming you hate the garbage collector because it definitely hates you

magic falcon
fossil meadow
#

I love this

whole yacht
#

I do kinda like it kekw glad I use python most of the time.

tranquil flame
#

Go doesn't let me put my brace on a new line 🥲

brazen eagle
leaden berry
#

I can just choose to ignore the entire right hand side

brazen eagle
#

it's still objectively wrong

stark summit
#

its not wrong. its a SIN.

#

that thing scares me,

magic falcon
brazen eagle
whole yacht
#

brace style is fine but single letter variables are pretty bad.

tranquil flame
compact turret
brazen eagle
#

That just looks like a hello world and also getting lost in their directory structure

gleaming acorn
#

the product placement is insane

compact turret
#

in all fairness we all have suffered from impostor syndrome at least once

brazen eagle
#

Oh I get lost in my directory structure all the time

still basin
sand hinge
#

Hey hey, anyone worked previously with some kind of database schema management tool? Like Liquibase, Sqitch, Flyway etc. I am intetesting in pros and cons i any of the database management tools.

stark summit
rapid plank
nocturne wadi
#

What do yall think of this draft?

rotund bison
#

In the same situation but for Python and Java both.
My High School couldn't do anything since I wanted a AP credit.
If it's a normal Computer Science class just ask for Credit by Examination (CBE) or ask the councilor about it.

nocturne wadi
#

What do you mean by “normal cs”

rotund bison
nocturne wadi
#

Im in AP

rotund bison
#

That does depend if your High School offers it.

rotund bison
# nocturne wadi Im in AP

Yeah they don't usually have more advanced classes, until you pass them in order which can't be done via CBE since It's a AP class.

#

Like I've done Python and the certificate they train for (PCEP) also but a year ago so I am just sitting in class either studying hacking on my laptop or completing other subjects work.

nocturne wadi
#

Well yeah but im trying to just finish the first semesters work so i can do my own projects and learn that way

rotund bison
#

I've emailed the TEA about this as a last ditch effort to see if anything is possible at all, I haven't received a response yet but let me know if you want me to notify you if I get a response.

nocturne wadi
#

Sure i guess

#

Im just going to be bored asf all semester

rotund bison
nocturne wadi
#

Maybe i can do that

rotund bison
nocturne wadi
#

I dont see how that’s relevant

rotund bison
#

I only know about Texas and TEA is only applicable in Texas.

nocturne wadi
#

Ah ok, ill look into that

rotund bison
nocturne wadi
wispy kestrelBOT
#

Gave +1 Rep to @rotund bison (current: #1452 - 2)

rotund bison
nocturne wadi
#

Yeah fr what is this? I thought it would be challenging

rapid plank
nocturne wadi
nocturne wadi
brazen eagle
misty sky
quick anvil
lyric mirage
#

You'd be surprised on how much collegedoesn't teach.

brazen eagle
lyric mirage
#

Most people gloss over that

brazen eagle
#

Yeah

#

plagiarismresearch is important

magic falcon
brazen eagle
#

But also learning how to borrow be inspired by others' code

hollow sorrel
nocturne wadi
gleaming acorn
nocturne wadi
#

But i want a hard class is my point

misty sky
nocturne wadi
#

Its only two semesters tho, no cert or degree either

misty sky
nocturne wadi
#

Thats what im saying

misty sky
#

if you know them and you aint getting something for it, then do something better

nocturne wadi
#

I would but its technically a prerequisite to Advanced software dev

misty sky
nocturne wadi
#

Lol sorry 😅

#

Just annoyed at how easy it is

misty sky
fickle barn
#

what is the best dark vscode theme for python c ...

lilac holly
#

Hi guys I'm absolutely horrible at decoding reggex and a bit confused here at an example. I understand the basics that they are saying replace whats in between the // with whats in the quotes. But I'm getting confused by all the rules of regex to really understand what and why they are replacing this particular charter. Please help 😃!

 key.replace(/ [\[] /, "\\\[").```
ebon cliff
whole yacht
stark summit
#

basically \ and [

lilac holly
lilac holly
lilac holly
lilac holly
lilac holly
ebon schooner
#

i didn't read that as strictly being a RegEx problem at the time. It was a change to a config parser / config file pair which caused an off-by-one error, as the parser was expecting 1-fewer (or 1 more? icr) entries in the config object and didn't properly validate inputs

#

did I gloss over the regex part?

#

yeah no I'm still right

#

regex involved tho

nocturne wadi
ebon cliff
#

Had to do some non-cyber training 😛

nocturne wadi
#

Unrelated: Im going to try to learn the basics of rust

misty sky
lyric mirage
nocturne wadi
#

The main thing i dont like is that return types are defined weird

#

fn func_name(inputs) -> return_type {}

brazen eagle
lofty pasture
#

Sorry for the newb question, but why is that if statement at the bottom changing the value of b? (Try to ignore the horrible code, I was trying stuff out and havent fixed anything)

#

Never mind I apparently forgot google exists

brazen eagle
#

Also assignments assign 😉

#

Common mistake, syntax is fine so the compiler doesn't grumble

#

One way to catch those a bit more easily, if you have a constant term, is to put the constant term first. Then the compiler yells at you

wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle (current: #12 - 595)

brazen eagle
#

Trick that works well in C/C++

#

You should probably be setting decimal_value to 5.0

lofty pasture
#

When assigned as a double?

brazen eagle
lofty pasture
#

Okay thank you again!

brazen eagle
#

Best to be explicit there

tranquil flame
#

Yeah don't rely on casting lol

brazen eagle
nocturne wadi
#

reading some docs and articles and suddenly rust syntax seems a lot more natural

#

stone kayak
nocturne wadi
nocturne wadi
#

Just finished the classic Todo list in rust

nocturne wadi
#

Quite proud of it tbh

nocturne wadi
#

I dont really C it tbh

brazen eagle
#

Also split files by class, which helps see what's what

#

Also you should probably have 1 repo per project 😉

remote relic
nocturne wadi
brazen eagle
nocturne wadi
#

Ah so just using a String and i8 in another struct instead of a tuple vector?

brazen eagle
#

Was hard to guess what it was tbh

azure peak
#

Hi I am newish to python, and am calling an API, I am just trying to get more than 50 results into my data frame and not sure what part of the code isn’t letting it loop to the next page

ebon schooner
#

If you're trying to query the youtube search api you're going to mostly be out of luck unless you pay for it. Itll only return a fixed amount of results and you can't manipulate the start point iirc.

rapid plank
#
[...]
INFO:root:[info: _make_fraction] Created fraction #1
DEBUG:root:[debug: _write_fraction] Wrote fraction #1 to /home/skelly/projects/erebos/src/server/gf4su2dma4w2vs66
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
^C
Keyboard interrupt received, exiting.
INFO:root:[info: _close_stream] Closed stream to /home/skelly/projects/erebos/src/lkm/lkm.ko.

Almost finished the server for my linux fractionated cavity loader!!!

nocturne wadi
formal oasis
brazen eagle
hollow sorrel
#

Hi all, I've been doing a lot of cryptohack.org but most of the modular arithmetic are going over my head. What are some good resources (book, Youtube, etc.) that you can recommend so I can get up to speed?

#

For reference, I did finish engineering but we did not have a lot of discrete math or linear algebra

lilac holly
#

How do I post code with a format here?

#

Idk if I'm explaining myself well

lyric mirage
#

Use code blocks.

#

With the language, if Discord supports it, it will change some colours, but it will not format for you.

lyric mirage
lilac holly
#
#include <iostream>

using namespace std;

class PtrExample {
    int* ptr;
public:
    explicit PtrExample(int* p = NULL) { ptr = p; }

    // Destructor
    ~PtrExample() { delete (ptr); }

 
    int& operator*() { return *ptr; }
};

int main()
{
    PtrExample ptr(new int());
    *ptr = 20;
    cout << *ptr;

  
    return 0;
}
#

I'm confused about smart pointers, what are the advantages of using it?

#

And why do I need the explicit keyword?

#

What would happen if I was to call delete ptr in the main() function after using *ptr = 20?

lyric mirage
#

Please don't use that term in the server for anything.

lilac holly
#

I think now I'm starting to understand the code well but I appreciate some insight

brazen eagle
nocturne wadi
plucky helm
#

I don't think it will be a nullptr pointer, instead it will keep the memory address from new int(). In the destructor, that needs to be manually cleared. Correct me if I am wrong😅

nocturne wadi
#

Not super important but still something to consider

plucky helm
#

Yeah, actually super important to consider. It can lead to UAF bug

plucky helm
#

Use-After-Free

nocturne wadi
#

Ah ok thanks

lilac holly
#

Oh shit you're right

#

Didn't think about it

lilac holly
#

Am I right?

lilac holly
wispy kestrelBOT
#

Gave +1 Rep to @plucky helm (current: #32 - 236)

wet elm
#

What should I look into if I wanna host my own server so I can attack it and test some scripts? Virtualbox a Linux distro and run the server that way?

#

I mostly wanna check some host recon stuff

hollow sorrel
#

VMware workstation pro is free now so you can also use that.

wet elm
#

Okay I'll look into it

tired hawk
#

Guys, is DSA necessary for hackers? I mean, I haven't seen any scripts using them

hollow sorrel
wispy kestrelBOT
#

Gave +1 Rep to @hollow sorrel (current: #22 - 399)

hollow sorrel
tired hawk
hollow sorrel
prime falcon
#

When I have this stack with 0x10 (16) * char, shouldnt admin be overwritten when writing 20 chars to the stack?
int admin = 0; char buf[0x10]; gets(buf);
I only got it to overflow b"A" * (0x2D)
which is 45 * 'A'

brazen eagle
hollow sorrel
brazen eagle
#

That would be player for the free version

magic falcon
#

@onyx merlin I know you're a rust fan, have you heard about the rust in linux kernel maintainer retiring from the project?

magic falcon
plucky helm
#

Oh, yeah. The one from Microsoft IIRC, it would be easier better to create the kernel in Rust from scratch instead of adding little components

brazen eagle
magic falcon
# brazen eagle Wouldn't discount Linus being an ass

yeah, apparently this was up to the DRM (Direct Rendering Manager) maintainer though. apparently there was some "make it like the amdgpu drivers" discussion, and the rust drivers are fundamentally different and cannot fit that pattern

brazen eagle
#

Wouldn't that be a technical issue?

magic falcon
#

more political than technical

#

there was apparently significant tech debt and the maintainers refused to modernize or patch known issues in the kernel module

#

it wasn't that the work couldn't be done, it was refused to be done

plucky helm
#

C people can't c rust

lilac holly
#

Rust is for those who aren't confident in their skill of not having memory problems

#

(This is a joke)

brazen eagle
plucky helm
#

testing helps in the long run to identify any regressions, doesn't mean one isn't confident but lazy 😛