#how do I get a websites source code?
141 messages · Page 1 of 1 (latest)
Use devtools in your browser?
If it's serverside thing they're doing, you can't see that unless they published it
There are two parts to a website. There's the front end which you can see just by using your browser's dev tools (inspect element) or downloading the page. Then there's the backend which you can't see unless it's on a site like GitHub, which isn't super common. There are a lot of backends you can look at on GitHub though.
I’ll try when I get home haha
This is one of our websites. It's not online right now but you can see all the code https://github.com/beginner-codes/summer-of-code-website
And here's a much simpler website we have. It's online at https://beginner.codes https://github.com/beginner-codes/website
how would I get the source code of a different website though?
You can get the front end by downloading each page from your web browser.
Either by them publishing the backend/frontend code on Github, or using Inspect Element/Devtools which will get you the frontend code
They didn’t upload it on GitHub, I checked
Then you can only get the frontend code
Okay inspect element or dev tools
Then I’d open in notepad..?
Or an IDE
Okay!
What are you attempting to do?
With the source code?
Fair enough
It generates random stuff
So I wanna see how that’s created
Yknow?
Interesting for a beginner like me
Fair enough, just keep in mind you might not find what you want by downloading the frontend code
Don't know what website it is, or how they handle the generation part for whatever you're interested in
what’s the difference between a frontend code and the source?
Frontend code: HTML/CSS/JS visible to the user when visiting the page
Backend code: Everything else that's required to host the website
Oh I understand
Source code usually is everything combined
Such as the Github for the SoC website Zech linked
Also, I have a quick question
After decompiling something, how would I filter out the main code in ghidra?
If you know
No?
You're still trying to get the source code for the virus you got sent?
Lol
Ghidra disassembles executables into ASM
So, you'd have to find the entry point and manually go through that to see what it does
I used a different decompiler too
Where I have a folder of it
I’ll find it later when I use my pc
Have fun
And, still, do not download Windows executables or malware on a Windows machine
That's how you get your accounts stolen
You'd download them into a VM without shared folders, and do everything you need in there
You do not want to use any VMs the viruses can run on
A lot of the harsher malware you'll encounter will have VM escaping scripts embedded into them
So if the executable can run, it'll infect both systems
So should I use Linux?
Yes, like I already told you in your other channel
Ah I see
And, the virus you got is using a custom version of PyInstaller
So the header is malformed for any decompiler tools
You'd have to dive into bytecode reassembling and fixing, and figuring out how the virus was created and using what tools
But, yeah, for Ghidra you'd at least need to learn some ASM
You'd probably want to practice disassembling things with something that's not a virus
Before you ask: No, there are no tools that can do that for you automatically
Yeah I was doing that a tiny bit earlier lol. My friend was sending me random py files that I had to decompile and find stuff like a discord webhook.
.py files aren't compiled in the first place
Yes I had already searched for one hoping there would be one hahahahha
You can open those with a notepad and just read the code
That's a compressed file format
Yes
You're gonna have to make your own tools to decompile whatever you got sent
Depends on what you want
Did you try:
Dev tools -> Sources?
where are dev tools?
i'm using edge just on a VM
lolz
What kinda generator are you attempting to download??
Is there a reason you're using a VM?
^
No, I just had it open and i didn't care to close
Tells me sooooooo much
And devtools for edge are either:
F12
or
Ctrl+Shift+I
Time to start reading my dude
ah i found it
nevermind lol
I found Developer Recources
No Developer Tools
it says status success?
What might that screen even look like?
with a URL
Screenshot maybe?
What does the entire developer tools menu look like?
Not gonna have much help if you don't share more
Top bar, press the double arrows
Find "Sources"
What even is the "random stuff" the website is generating?
From how much you're cropping things out, makes me think it's yet again something extremely suspicious
And close out the "welcome" tab
its just random stuff lolz
What "stuff"?
Those are the things you need to use
Bruhhhh