#programming
1 messages · Page 11 of 1
It makes python syntax more like C
But you'd still have to indent?
That's the only thing I don't like about Python syntax
Yeah but i indent anyways
Someone downloaded my extension lol
Why would you not indent?
Even for languages which don't require indentation, it's so much more readable
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
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? 
K&R style best style
Job security
Hello is there someone who knows c#
For sure, just ask your question and maybe someone will answer
Uhm is helper.GetFromConsole a specific library or a toolkit?
Ist not a class so I can't run it
everyone'll just run a bloody linter and autoindent everything anyways
How can I read the file path from a file descriptor? I can't use fcntl with F_GETPATH since that is macOS only.
what language?
We need to know what language like Jayy said
In C
I'm sorry
Please do not recommend people answers from chatgpt. This method is dirty and prone to race conditions
We don't suggest ChatGPT here @nocturne wadi
Thanks
Oh
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?!
https://youtu.be/mzdvw_euKlk?si=d5uGLFTzsXCMFB9e
Wow. Just wow.
This was a live demo from our OpenAI Spring Update event.
Read more about GPT-4o: https://www.openai.com/index/hello-gpt-4o/
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
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.
well there are some free open source llms that you can use locally
the problem is their quality is not really as good
I tried out GPT4All with Mistral model before and well it is not great.
Theres the NVIDIA app that allows you to input whatever text and it can answer based on all of that and it runs locally
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 ?
you would have to escape the double quotes
no not like that... using \ to escape the problematic characters
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
@rapid hound
System.out.println("my name is \"fares\"") 🙂
if you havent figured out by now 😄
Thank you alot guys I really appreciate
course
Good for you(not texting whilst driving)
Yes 🫡
Hey would someone looks this over and tell me what im missing? https://camogekko.github.io/beginners-guide-to-programming
Notepad and windows is ur best friend icl
Meh, vs code
VSCode for life
Never used anything else and probably wont unless i really have to
Ig i use nano sometimes
on windows, Nano & VS-Code
Vim
the vim and emacs motions can speed up your coding a lot when programming
For small scripts vim just feels good
Or in my case, severely slow me down due to my lack of vim knowledge 
What's up, whats the issue?
am making a Anti-virus that is a virus and a anti-virus at the same time
I don't understand what the issue is here, this code is valid
i mean how the hell am suppose to get the anti-virus check the MASTER-BOOT-RECORD?
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
ok...
Any specific questions should be asked in #advanced-general though
what language are you using?
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...
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.
Hey there, again, please be aware that malware discussion (like that) is limited to the advanced channels
what do you guys mean by adv chs
@weary prawn
what if I have other certs to prove I'm experienced
What certs?
from coding sites, hackerank, leetcode, codeforces
These aren't quite the same as OSCP etc.
look you guys use what we create. sites I shared show my level of expertise in coding
Sorry, point still stands.
absurd that you won't let discussions go on here, what's the difference
New users may try out discussions and damage their computer.
that's not logical, we're not sharing virus we're helping code
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.
commitment? coding is commitment we have streaks to show level of participation, furthermore engaging in an active coding project like building an antivirus shows commitment and understanding to the course
Yes but coding malware is not a beginner topic, and as I said, Discord is very strict.
If you know what you are doing and are capable of writing malware at a high level, getting Level 13 on the website should be a piece of cake :)
will
silly goose ngl
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'
Definitionally, there is no good virus. It's a subcategory of malware.
ok i deleting this project then
That's still technically malware, and depending on how it spreads, unauthorized access of an information system which is very heavily punishable usually by hefty fines and/or jail time
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
ok thanks
Gave +1 Rep to @brazen eagle (current: #11 - 571)
it's still illegal, and ethically questionable
Wdym?
instead of ./password.txt
/path/to/password.txt
for example, /home/kali/Desktop/password.txt
@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
Okay, thanks guys.
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
You learn more advanced things and more efficient ways to go about things
Usually it's not that you spend years learning a language; you spend time in classes learning other things, which the programming portion builds on top of, and tests the depth of your knowledge on the course subject.
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
Programming is more than just knowing a language, it's also knowing how to get a computer to understand what you want it to do
Its also understanding that you cant just throw your computer at the wall, youll want to do that sometimes
This means that they do not only teach for loop, if statment, ., they teach me how to make the computer understand what I want?
They would probably teach you loops yes but mostly it will be learning how to properly tell the computer what you want
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
what is the difference between char and string?
and why char only store a single character? i'm talking about c++
You kind of answered it yourself. A char is one character, a string holds one or more characters. It's like that because the designers of C++ (https://en.wikipedia.org/wiki/Bjarne_Stroustrup) decided so. Fun Fact: In the original C there was no such thing as a string. You had to work with single chars in arrays.
I do not miss pointers
I'm planning to buy a book for python by author Eric Matthes is it good
this one?
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
and on humblebundhe tere is often python books
pointers = every c programmer nightmare
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++?
Something for folks to play with
https://gist.github.com/VTSTech/bb858a2039fe84cd35af4064c0aa44d8
VTSTech-GPT - Generate text with Cerebras GPT pretrained and Corianas finetuned models - VTSTech-GPT.py
As someone who uses C++ constantly, yes there is too much however it doesnt usually matter because its all in libraries that you can google search for. C++ is really expansive but its a really good tool to know IMO
there a lot of keyword in c++ that's what i mean
There is a huge amount of keywords in C++?
There are a lot of keywords in any language. https://en.cppreference.com/w/ is my preferred reference for the 'normal' C++ libs
is it good to learn c++ from w3school? or from cppreference
as a reference tool, cpp-reference is way better. If you are new to programming, the structure from w3school may suit your need better.
If it's anything like it is for python, I wouldn't recommend w3schools
i just want learn the baisc
I found https://www.learncpp.com/ useful
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
@sinful dome What manner of hacking? Is it an in-game mechanism, or do you mean you actually have to poke stuff to win?
Check out Task 12 in: https://tryhackme.com/r/room/adventofcyber2023
Get started with Cyber Security in 24 Days - Learn the basics by doing a new, beginner friendly security challenge every day leading up to Christmas.
To be perfectly honest, that's terrible gameplay design
At the very least it's non intuitive
There was that one defcon badge with a similar ish concept
Actually it's quite a bit different but still cool: https://github.com/DC801/BM-Badge
no scince am not inding a team for CTF i created a thing simalar thing to CTF myself
ok.
am deleting that
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
Do you have the link to the libs for C#, something like this one for C++
Thanks man
Gave +1 Rep to @nocturne wadi (current: #238 - 22)
Real ones uses vim
I use nano cuz im a silly goose
which method??? there are quite a few
Shutdown pc
ah
:q!

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
wack js
Gods JS typing is really really weird
Value vs reference
Primitive types are usually assigned/passed by value, objects will use references. You have 2 separate object definitions so 2 separate references
Wonder if that hasn't already been done
aren't primitive types still objects? everything should be an indirect reference, at minimum
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
some of them, like strings, are a bit weird
references are probably reused for certain objects like empty strings/arrays
especially if they're constants
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.
Idk why void pointers are a thing
The gcc compilor is the weridest thing ever on earth
and by the way guys can someone check my repo and give a feedback?
https://github.com/malisio/Humble-Projects
They're used for magic
Also void** is used for laziness
also as a handle to pass a function pointer reliably
Well yeah
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
Had some trauma with a set of libs that over abused void pointer pointers
Some calls had void pointer pointer pointers
Pointer pointing at the pointer.
How do programmers know the tasks required of them and how do they even upload scripts?
That's a rather unspecific question. Upload to where for example, for what reason?
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.
praise the lord for PMs and POs
The competent ones at least
Let us say that I am a programmer at Twitter, Facebook or other companies. Can I as a programmer, upload any software code?
No. All those companies are required by law to enact specific practices regarding source code management to prevent anyone from doing that.
You can upload code to a certain place on a development server, but it's not going "live" without other people seeing, testing and approving it. Most likely in a multi-stage process.
You have no way to circumvent those checks.
Here is only programing in programing Languages or in engines too
to be fair though, these things very probably have open source dependencies, and if you're very crafty, you can get some code in through those...
see the XZ debacle
Any suggestion on a good resource for windows API with C implementation? I do currently use official docs and an oxford's https://users.physics.ox.ac.uk/~Steane/cpp_help/winapi_intro.htm
I am a beginner and anything helps. Thanks!
Official docs are your best bet, but they can be a bit obtuse
indeed they are. I am kind of always confused when i see their documentation
any other suggestion that can help me. I can say for sure the leap of faith is not working out for me.
Don't know of any other accurate sources unfortunately, I'm sorry
no worries thanks.
Gave +1 Rep to @brazen eagle (current: #12 - 572)
https://github.com/auchenberg/volkswagen I found this entertaining (please don't actually use this in prod)
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.
@nocturne wadi please do not post harmful commands even if they are in screenshots (as per the rules)
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?
Apply solid principles to your code
Split up everything that can be
Let's also try to avoid being patronizing/rude, please
Also make sure your scope and requirements are well defined
wdym split it up?
Oh i didnt mean to be rude or patronizing, just thought id put another meme that i had because my previous one got removed
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
Oh ok thanks
Gave +1 Rep to @pliant wyvern (current: #2090 - 1)
Also thanks hydra
yeah ofc
^ , also how do i get the 0x3 tag?
@pliant wyvern
THANK YOU
Haha
W
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
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
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";
}```
Also if youd rather look at it in github here
https://github.com/CamoGekko/Coding/tree/main/c++/game
oh and also none of the couts go off
Wondering if interpreting size as a char* isn't causing issues
Also this looks vulnerable to a buffer overflow
At first glance anyway
That's java right
C++
yeah c++
hmm so how else could i do that?
Like just a char[] or what?
What's the range?
Wdym the range?
I meant the size field
And is just an int
Then cast to an int, preferably unsigned
Ok it can be unsigned yeah
You should be able to use a struct as well no?
Also check to see if any serialization libraries exist for c++
Reinterpret casts are dangerous and very very unsafe
Look up Boost
It has a tonne of useful libs
Many of which have been integrated into the language
Here's another that popped up on Google https://uscilab.github.io/cereal/
NEW DISCORD SERVER: https://dsc.gg/elseif
i made this one
"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
Oops
that's really unfortunate.
happens to the best of us
How can i prevent a double from overflowing? Getting an FPE and i suspect thats the problem
in c++ specifically
wait nevermind
You probably aren't going high enough to overflow a double
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
Could you share a screenshot of that?
I meant the code
I only see a file to download, no screenshot
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?
yep I wanted to mesure the size of the array to cycle trought it (even tho I changed it with 100 to test it)
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.
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.
Yep but assuming len was used. How does dividing the length of a pointer (4 or 8 byges) by the size of the first character in the string (typically 1 byte) give you the number of elements?
logic error. I can see the intent, it's a bad implementation.
he's trying to divide the bytes of the array by the size of an element
That's a fixed value on a given system, independent of the length of the input.
Yes, bad implementation.
Ok thanks for confirming that.
I saw a lot of this kind of thing when I was a GTA for an OS course at university
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.
hahah thanks I guess But I solved it xD.
Gave +1 Rep to @frosty totem (current: #69 - 95)
as Juun said I did a bad implementation and fixed it
and It did pass all the test cases thanks too @magic falcon
was this homework?
No a challenge on hackerrank
Generally we frown upon asking for help with competitive challenges, sites, coursework, and professional tasks
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
that's fine, so long as it isn't a competitive challenge
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.
What's the issue? Can you share the unit file you created and the output of systemctl status YOUR_SERVICE?
Sure, let me grab the status. I'm mostly assuming that it's something wrong with my shell, since even trying to invoke it doesn't seem to do the intended program
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
I got honestly no clue how xmodmap works so if it's that I'm out 😮
I'm thinking it's probably not the command itself, because when I run that command by itself it works fine
So I think it's just something wrong with the shell or the service
Do you get an error if you manually run the script?
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
I meant if you run the script manually
/usr/local/sbin/keyswap.sh
Did you make it executable with sudo chmod +x?
Says No Entries
Yah, I'll have to look it up again but I think I used sudo chmod 0700 ((Sorry, I don't know how to format the inputs in Discord)), and i did it while I was root
Huh 🤔
Did you run that command as sudo?
Ah, I didn't, I didn't know you needed sudo to run a log
@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
xmodmap unable to open display ''
That's the error you're getting, need to query that in a search engine
You can check that with ls -l. What permissions does it show for the script?
Ah, hence the error in the journal. That makes sense.
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
Again, new to Linux still, but this means read/write/execute for the User, right?
Yes that's good. You wouldn't see an/that error in the journal if the script didn't execute.
OK, thank you both. Let's see what it has to say...
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
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.
Okies, I'll give that a try
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.
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
Ok but that's a different issue
Is there a better way to test if the service is working ok without just restarting the computer?
sudo systemctl start SERVICE_NAME
But that's not gonna tell you if it's gonna work on boot after thr changes. You need to reboot to test that.
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
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.
No entries in the journal. Should I try to run it before I make the changes and run the journal again?
I don't wanna keep throwing ideas at you without knowing whether they work. But that's the best I can do, sorry.
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
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.
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
I just don't know when this will get executed. If it's late enough for your command to work
In the boot process
I assume Cron is one of the last things to load and run, right?
Do I have to include sudo in a cron table, or does cron have root permissions?
If you run sudo crontab -e I think everything in there will get run as root automatically
Yah, I did that to be safe
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
Yay, I fixed that part at least. Still no idea how to deal with the crontable not loading at reboot
If you ever figure it out please share how, I'm curious.
What have you got on the crontab?
Right now, just @reboot ABSOLUTE/PATH/keyswap.sh
Did you chmod it?
This should make it executable by the system, right?
Sorry, yes, I chmod it and that's the permissions now
Yes
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.
The idea being to reboot and then go check the tmp to see if the marker is there?
Yep
Great. Sorry for the rudimetary question, just making sure I'm getting the theory right
Don't worry
So the marker shows up, so I guess the .sh is working...but then why isn't the main part of it ><
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
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
If the script is executed as root that applies to all commands inside it. No need to add sudo.
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
It's definitely owned by root, I can't do anything with it when I'm not logged in as root. Hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
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.
What difference do you think that makes? We established your script ran as root on startup.
We established that the crontab ran on startup because the marker was placed, but the keyswap did not. According to stuff I looked up, if it resource belongs to root, then it needs to be run out of the /etc/crontab, where as user tasks can come out of crontab -e
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)
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?
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.
Did you find a solution?
Not yet, but someone on the Linux Discord said that trying to use cron was basically a fool's errand
Could you link that conversation? I'd like to learn from it. For example why that is a fool's errand 😄
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.
He didn’t really expand on why it was bad, only that I should run the script as part of my login profile or global profile, and that cron is absolutely the wrong tool for the job
Yeah, cron is used for timed job scheduling.
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/
I'm a beginner level coder in python. Can I ask some really basic python questions here and maybe get some code review?
Go for it
chatgpt is your friend!
It's a bit dangerous for beginners who can't tell a hallucination from actual code
hmmm can be, but I used it to learn when I started to code and I have specifically asked to break down the code and explain me the "mechanics". It helped me a lot and still does today
It's a fantastic tool for that and in my experience explains code better than 99% of humans. Potentially dangerous is blindly running LLM-generated code as it might in very rare cases damage things.
Especially if running with higher privileges.
I'd only recommend AI for coding if you already know how to validate what the thing spits out
Half the time it's explanations are useless for me, as it's not telling me anything new
You're not a beginner, of course it's not telling you much new.
Sure but I'm still wary as I've seen it spit out absolute garbage with alarming regularity
Not my experience.
I think there's a Dunning Kruger effect in play with gpt
Not saying don't use it, just be wary, and be able to validate against other sources
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*
50/50
I wouldn't recommend it for learning simply because there is much better and more accurate resources
Is anyone here interested in crypto virology?
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.
depends what you intend to do with the info-
Yeah pretty interesting stuff
What kinda of algorithms?
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
Hello. We don't help with school work.
what do you help with
Ethical and legal matters.
We don't help with unethical, illegal, or school/Uni/work.
help me for ethical hacking purpose then
We don't help with unethical, illegal, or school/Uni/work.
Sorry?

Good luck with your project.
thanks
Gave +1 Rep to @lyric mirage (current: #1 - 2406)
@daring nova No self advertising please without engaging with the community more.
Apologies! I didn't think it was self advertising. Was only trying to share something I've been self-learning and see what others think of it 🙂
It's OK, we would just rather community members become part of the server and converse, some members have just dumped their github etc without speaking.
Helo are there anyone who know Ruby ?
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.
Is this an active CTF?
Yeah
Then we can't help, sorry.
That would be cheating.
Okay thanks
Hello guys
I guess ur trying to connect to the network of try hack me with an open vpn ryt???
Thanks
Gave +1 Rep to @drowsy pelican (current: #294 - 17)
Not like that. I can connect but I worked on some ctf. I had challenge here about code injection in ruby language
Anyone good at C# i can DM? ty
You may ask your question here, and someone may respond 🙂
ok , im having some problem compiling this ||https://github.com/mattymcfatty/unquotedPoC.git||
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
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?
As always with html it might depend on the browser, but typically you're not even able to type more than 10 characters.
thanks 🙂 was thinking so ^^
Gave +1 Rep to @frosty totem (current: #49 - 151)
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
jep, thanks. Just wanted to verify because im not really into html. I verified in burp the problem.
Gave +1 Rep to @tulip sail (current: #9 - 767)
Nice one 🙂
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
could you elaborate ?
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?
I'm no C++ expert so I could be wrong but it seems that you have a duplicate accept call, meaning the first one doesn't get handled, as you experience
This C and yes you are right I couldn't see the double accept function the first one is unnecessary and will block indefinitely until a client connects.
lack of sleep is bad ngl 
anyone could recommend some good reverse engineering resources like free Books, online courses, or tutorials. Thanks in advance!
Non-English-based programming languages are programming languages that do not use keywords taken from or inspired by English vocabulary.
have fun
the math ain't mathing
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
Whwre did you get the bin?
Really, really, fast and literally zero customisation needed, it just...works...
Hey is this Pwnable.kr?
Is it allowed (i think not) to upload scripts or code files in general?
Depends on source
Self written scripts. From the community etc. .
Don't really know tbh. Its from some ctf or something
Still active?
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?
Not sure. At least i am not playing any
You're storing input into a 48 byte buffer, shouldn't be too hard to figure out the overflow 🙂
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
You don't want the stack check to fail
Ok stack check was failing after 56 characters. So like 57 onwards.
You're mashing the stack upwards, think about how you want to insert your inputs
57 sounds like you've gone too far
In theory you need 52 bytes
And a bit of thinking about how ints are stored
So you are saying the type of the input will affect it? Meaning the local_18 is int. So i have to pass in int variable?
Nah the hex should be fine
But if ints are stored as little endian in memory, then you might be going at it backwards
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
Experiment 🙂
Thanks
Gave +1 Rep to @brazen eagle (current: #12 - 581)
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?
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
yeah guess thats why pwntools is the best
is this fr? lol
^ not piracy if it was not clear from the repo descriptions readme.md file
Probably not lol
Is anyone random interested in a pi project? Its about a botnet detection system combined with an IoT pentesting lab.
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)
What's a problem that you've encountered recently?
Yes
Hi. Nice to know. Any knowledge with raspberry pi?
Yes I done some projects related to AI using pi & have basic knowledge about pi
I thought about to to it with some help of ai cuz it would be my first project.
But if i could do it with someone of the community it would be cool.
My project is based on Image processing..
Sure... I am interested to learn something new.. I am beginners in cyber sec. So I would like to do some cool stuffs😁😁
Face recognition based or images in general?
Me too. Which programming lg did u use?
Images.. But also Face Rec..
Py with CV
Python is perfect.
So... honestly i didn't count with someone who's up for.
Which timezone is yours or better ur in?
UTC +5:30
And u?
Nothing. Really. The problem is why I don't get any problems
How about a pentest report writing tool?
I've never written a pentest report so I don't know how that goes. But definitely gonna look into it. Thanks!
Gave +1 Rep to @brazen eagle (current: #12 - 586)
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
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)
Don't worry about performance. If you think you need performance, study algorithms and data structures.
Performance does really matter in competitions I saw a solve in cpp that had a run time of 25MS and the same solution in Java in something like 30MS-32MS.
Keep in my mind they both spent the same time on the solution. and keep in my mind that online judges doesn't only care about the solve being either true or false many others factors come in play Time Limit Exceeded and Memory Limit.
that why I was concerned about the performance
I'm already doing. Got a book about algorithms and data structures.
Why ppl doin competetive programming? Is it just for fun or a deeper meaning?
Same reason people do competitive CTFs in InfoSec
And the reason is?
Money, fame, entertainment, girls, friends...
job opportunities...
that sort of things 😄
Those restrictions are there to ensure you have an acceptable solution, a bad solution in any language will make you exceed the limits and a good solution in any will make you pass them
Yeah kinda but still cp isn't only get a solve and submit it
For now I wont think abt the preformance but rather building a logical thinking and a good aproach to Cp
Mf said cp brings Girls LMAO
Mainly to evolve your problem solving and to bypass interview Question.
don't show girls cp pls 
There is comepetive for girls I do believe
I'm sure somebody has found love at a competitive programming event
Not the best place to fall in loVe Lmao
why not? you saying that hot girls can't be geeks? come on, it's 2024, they can be whatever they want 🙃
I mean yeah kinda but the last thing that people can do is social in a cp event Lol.
For me I would just attend solve and go.
I dont get paid enough for that shit
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
I should start with 🫡😂
An answer i can absolutely live with. 
Last one more than the first one but maybe it depends on the person itself.
their faces when the interviewer replies "nice, you got that one memorised, now tell me how you would implement a thread pool accepting incoming tasks, where you would use this and what to be aware of with regards to memory and shared objects"

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
Language choice and data types as well, ttl, a fixed defined number? Idk...?
Sorry sir that isn't in my interview book that I bought from a sketchy chines website.
The only thing it told me to do is nose training blaze
Some interviewers are lazy so they pull a leetcode question to solve it for them LMAO.
also another reason is Cp can help with Hacking af.
I got 30 rejections. I fear every interview 😂 . So maybe i should start in compete in coding 🤷
Here it is more about a degree issue. But maybe u are right tho. Idk cuz they don't reply to any questions.
is the correct answer "use the blasted framework"?
potentially 
depends on environment. We rely on opensource, but don't have the resources to scan and validate every single library.....so we make our devs write and test a lot of code from scratch.
I'm losing my mind... how hard can it be to add a dependency to a Java project ... in VS Code?
A nightmare
@brazen eagle , our resident java addict can help you more.
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
but imo, i’d use a Java specific IDE instead.
I use JetBrains' IDEA for everything, but a specific project requires me to use VS Code 🙃
maven or gradle
gradle
look it up on maven central then
Official search by the maintainers of Maven Central Repository
try running gradle on the cli then
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'
}
yes
are you using the Application plugin?
yes
plugins {
id 'application'
}
that should package everything properly as well
I just added com.google.gson.Gson g; to App.java and that compiled fine as well, but VS Code doesn't notice somehow
yeah I'm not a fan of vscode for Java
me neither
might want the import I guess?
nope
probably doesn't know where to look for libs
you have the Java extensions installed?
might be a classpath issue?
a couple
guess so, this is a mess, thanks anyway
Gave +1 Rep to @brazen eagle (current: #12 - 589)
you could disable the error messages if it gets annoying
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
it should
Yes, py works much better in vs code.
LOL
most of those points honestly seems like a skill issue, not genuine flaws with the language
from the same author
Languages are tools not relegions Lmfao
😭
It will never be "X"
xxxtentacion
Must just wanted to name a social media platform after his kid..
Let me tweet this
Spicy take, but Rust does force you to learn a bunch of complex semantic rules for how things work in the language. There are other modern compiled languages like Nim and Crystal which have GC instead of the Borrow Checker, which makes it much easier to learn/use. There's also Go, Zig, and V.
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
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/
Looks nice
. I'm honest, i just have looked into the code because I'm actually in python ^^ .
Thanks man :)
Gave +1 Rep to @edgy meadow (current: #407 - 12)
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
Are you using MUI?
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
@hot sigil Please engage with the community more before posting things like this.
Apologies. I was just excited to join and thought it would be a good introduction.
Hi, do you recommend any resource to learn python for pentest? Normally used libraries
There are some sources of yt videos but idk if it's what you searching for... .
Blackhat Python book
hi
hi i need to learn javascript because ive heard youll become a super nasa hacker if you know js
Learn JavaScript basics in 1 hour! ⚡ This beginner-friendly tutorial covers everything you need to start coding.
🚀 Ready to dive deeper?
- Check out my complete JavaScript course: https://mosh.link/javascript-course
- Subscribe for more coding tutorials: https://goo.gl/6PYaGF
✋ Stay connected:
- Twitter: https://twitter.com/moshhamedani
- Face...
thanks 🙂
Gave +1 Rep to @fickle barn (current: #2161 - 1)
https://flint.cs.yale.edu/cs422/doc/art-of-asm/pdf/CH02.PDF to learn about assembly language
I should learn assembly tbh
Ive always wanted to make my own compiler
Uh guys wth is C in boolean algebra?
Like with quantified logic?
No idea, whatever this is
That's just telling you total order and precedence for C operators
The C is just a generic variable, usually the letter after B 😉
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.
I define fullstack as someone who can both create the backend and frontend of a website.
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
it is indeed a stupid term.
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.
fullstack to me is a seniority thing. Jr/associates are either back or front, the expectation I have is that a senior can do both plus middleware
That's what the senior title is for 😉
kek
I just saw this on reddit lol
JS was a mistake.
It's a known technique to blank out an array quickly
Assuming you hate the garbage collector because it definitely hates you
i love that the property that ought to be RO is directly accessible and can be modified at runtime
I love this
I do kinda like it
glad I use python most of the time.
You should check out C obsfucation contest
Go doesn't let me put my brace on a new line 🥲
I can see the logic behind that... It's wrong but I see what they tried
having used Python for like 6+ years now, this actually looks rather pleasing
I can just choose to ignore the entire right hand side

it's still objectively wrong
how so? looks like valid C code to me
I mean the brace style....
brace style is fine but single letter variables are pretty bad.
omg go programs are also guilty of this
I was informed the other day they do it in this style because rob pike back in the 1980s said so: https://doc.cat-v.org/bell_labs/pikestyle
i have a gripe with python when it comes to using whitespace as syntax
That just looks like a hello world and also getting lost in their directory structure
the product placement is insane
#kodewithkatie 🤪
in all fairness we all have suffered from impostor syndrome at least once
Oh I get lost in my directory structure all the time
full stack is the entire tech stack in a program. This is the front end and the backend. An example is react on the front end and nodejs, mongodb, vercel, on the backend. If you can build on the front end and the backend, you are a full stack developer.
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.
i wanted to know the same. mind letting me know if you get any suggestions i might miss
What do yall think of this draft?
What country and grade?
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.
What do you mean by “normal cs”
Like there's a AP class, an AAC one, and then one without any suffix's.
Im in AP
That does depend if your High School offers it.
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.
Well yeah but im trying to just finish the first semesters work so i can do my own projects and learn that way
Same thing, but currently don't have any solutions. In the same boat.
The US education system has a checklist that you can't learn the same content faster without spending x amount of hours in class.
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.
I've got an agreement with my teacher that I'll just look at the powerpoint notes on my own and pass the tests since I already know the content, in return I get to do almost anything I want in class.
Maybe i can do that
Try it out, also what state are you in?
I dont see how that’s relevant
High School traditions differ from state to state from what I've heard.
I only know about Texas and TEA is only applicable in Texas.
Ah ok, ill look into that
Let me know if you get any solutions, since I'm still going to the councilor's daily to try out anything I see online.
Alright thanks for the help man
Gave +1 Rep to @rotund bison (current: #1452 - 2)
No problem, in the same situation.
Yeah fr what is this? I thought it would be challenging
They get progressively harder
I hope so, im going to take advanced software development next year
That looks pretty basic
Thats real? You can get way more acquaintance watching a 2 hour video about them… 😭
How often i see comments under YT video's saying that theyve learned more in those 5 minute videos than in 2 months of college.
You'd be surprised on how much collegedoesn't teach.
Hands on experience is the best teacher, but college is good for knowing just enough to know what you don't know
The years would be too long if they were to teach you everything
You're allocated x hours for self study anyway.
Most people gloss over that
Sometimes its fr like that 😭
and for learning how to learn in the area of study
That too, of course
But also learning how to borrow be inspired by others' code
bippity boppity, your code is now my property
It's an easy class to pad your gpa
But i want a hard class is my point
Its literally the first semester, its going to progressivly become harder, and if it were hard you mightved wished it was easy, and a cert/degree is just an assurance of discipline, so lucky you.
Its only two semesters tho, no cert or degree either
okay thats bad 💀
Thats what im saying
nah leave it id say
if you know them and you aint getting something for it, then do something better
I would but its technically a prerequisite to Advanced software dev
Okay nah you’re sending me the information in packets 😭 and i gotta capture them packet by packet, if its a prerequisite definitely do it 😭 🙏
nah dont be sometimes repetition is a key to carved memorization.
what is the best dark vscode theme for python c ...
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(/ [\[] /, "\\\[").```
From where is this?
lil something i wrote quickly
from what I know of regex is that it searches for [ and replaxes each occurance with an escaped version of it \[
its replacing the "<space>[<space>" with "["
basically \ and [
Better than Crowdstrike 🙂
Lol??? 😆
Old project with a friend I no longer talk to so idk what he was doing something with a URL
Yeah and only the first occurrence due to no g flag? From what I've learned. Basically sanitizing the input
Crowdstrike’s recent international failure was caused by a RegEx error
To be fair regex is honestly pretty confusing if you're not using it everyday. But as a multi billion dollar company thats kinda sad lmao.
Wait do you have any sources on that?
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
VTS! I havent seen you in a bit
Had to do some non-cyber training 😛
Yo cool, what kind?
Unrelated: Im going to try to learn the basics of rust
Uh ive heard pretty bad reviews on rust ☠️.
(In terms of pain)
@stone kayak is this true 😮
So far the syntax is… odd to say the least, but i mean it is fast
The main thing i dont like is that return types are defined weird
fn func_name(inputs) -> return_type {}
There's a few concepts that are tricky to get your head around, but it's overall an interesting language to work with
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
Missing an =, assignments are always true
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
Thank you for the advice!
Gave +1 Rep to @brazen eagle (current: #12 - 595)
Happened to me more times than I cared
Trick that works well in C/C++
You should probably be setting decimal_value to 5.0
Does that not happen automatically?
When assigned as a double?
Yeah but sometimes it's weird. And it's not immediately clear when reading the code
Okay thank you again!
Best to be explicit there
Yeah don't rely on casting lol
That's not quite a cast....yeah ok strike that it is
reading some docs and articles and suddenly rust syntax seems a lot more natural
…
i think its just harder to use at the start\
Thats definitely what ive come to realize, it looked alien at first and now im accurately debugging!
Just finished the classic Todo list in rust
Quite proud of it tbh
I dont really C it tbh
Should probably use proper structures for the entry rather than a vec
Also split files by class, which helps see what's what
Also you should probably have 1 repo per project 😉
I C what you did there
What do you mean by proper structures?
Looks like you were using a Vec for the Todo list item. Should probably create a structure for that instead with explicit fields
Ah so just using a String and i8 in another struct instead of a tuple vector?
Was hard to guess what it was tbh
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
Is it the youtube api
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.
[...]
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!!!
https://github.com/lil-skelly/erebos
We are looking for contributors, there is a deadline set for mid-october for a chance to release an article about the project in vx underground
let him cook
I mean what do you think GTK is?
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
Use code blocks.
With the language, if Discord supports it, it will change some colours, but it will not format for you.
Ik, then for C++ it's cpp?
No, it's C++ Kek
#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?
Please don't use that term in the server for anything.
Sure, I'm sorry
I think now I'm starting to understand the code well but I appreciate some insight
Easier to manage memory and reduces memory bugs
Pretty sure it would just be a null pointer at that point, if you tried using it you would get a nullptr error
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😅
Ah yea youre correct, still calling delete will end up deleting it twice once with the delete keyword and then in the deconstructor when the program finishes
Not super important but still something to consider
Yeah, actually super important to consider. It can lead to UAF bug
UAF?
Use-After-Free
Ah ok thanks
As I understand smart pointers are more resilient to memory leaks because as soon as it goes out of scope the memory is deallocated. In addition you have unique_ptr and shared_ptr which allows for a more granular control.
Am I right?
Yeah, you're right I've already seen some explanation of UAF but at the moment it went over my head
Gave +1 Rep to @plucky helm (current: #32 - 236)
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
Yeah, virtualbox is nice.
VMware workstation pro is free now so you can also use that.
Okay I'll look into it
Guys, is DSA necessary for hackers? I mean, I haven't seen any scripts using them
huge
Its not necessarily a hacker needing it but it immensely helps in understanding advanced concepts
Okey. Thanks
Gave +1 Rep to @hollow sorrel (current: #22 - 399)
Even me now, I’m taking Harvard’s free CS50 class to strengthen my fundamentals
Is it good? I saw one in w3schools too
Yeah the CS50 course is good so far
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'
For non-commercial use
Yeah, I think the older versions aren’t available for non-commercial use too. Only 17.5.2 (?) and up iirc
That would be player for the free version
@onyx merlin I know you're a rust fan, have you heard about the rust in linux kernel maintainer retiring from the project?
Not a rust fan, but lmao
he cited "non technical drama" without specifics, I wonder what was going on behind closed doors
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
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
Wouldn't that be a technical issue?
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
C people can't c rust
Rust is for those who aren't confident in their skill of not having memory problems
(This is a joke)
Just like testing is for those who aren't confident in their code
testing helps in the long run to identify any regressions, doesn't mean one isn't confident but lazy 😛

