#how do I get a websites source code?

141 messages · Page 1 of 1 (latest)

median night
#

I would like to see the code of the website (it’s a generator,) and not a big website whatsoever. 100 daily views, maybe.

high niche
#

Use devtools in your browser?

#

If it's serverside thing they're doing, you can't see that unless they published it

carmine hill
#

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.

median night
#

I’ll try when I get home haha

carmine hill
median night
#

how would I get the source code of a different website though?

carmine hill
#

You can get the front end by downloading each page from your web browser.

high niche
#

Either by them publishing the backend/frontend code on Github, or using Inspect Element/Devtools which will get you the frontend code

median night
#

They didn’t upload it on GitHub, I checked

high niche
#

Then you can only get the frontend code

median night
#

Okay inspect element or dev tools

high niche
#

Aka HTML/CSS/JS

#

Inspect Element/Devtools are the same thing

median night
#

Then I’d open in notepad..?

high niche
#

Or an IDE

median night
#

Okay!

high niche
#

What are you attempting to do?

median night
#

With the source code?

high niche
#

Yeah

#

Or, rather, why do you want the source code?

median night
#

See how it works

#

Since I think it’s pretty cool

high niche
#

Fair enough

median night
#

It generates random stuff

#

So I wanna see how that’s created

#

Yknow?

#

Interesting for a beginner like me

high niche
#

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

median night
high niche
#

Frontend code: HTML/CSS/JS visible to the user when visiting the page
Backend code: Everything else that's required to host the website

median night
#

Oh I understand

high niche
#

Source code usually is everything combined

#

Such as the Github for the SoC website Zech linked

median night
#

Also, I have a quick question

#

After decompiling something, how would I filter out the main code in ghidra?

#

If you know

high niche
#

Uh

#

Have you learned x86-64 ASM?

median night
#

No?

high niche
#

You're still trying to get the source code for the virus you got sent?

median night
#

Lol

high niche
#

Ghidra disassembles executables into ASM

#

So, you'd have to find the entry point and manually go through that to see what it does

median night
#

I used a different decompiler too

#

Where I have a folder of it

#

I’ll find it later when I use my pc

high niche
#

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

median night
#

Yes I am using a windows VM

#

Thank you for the warning

high niche
#

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

median night
#

So should I use Linux?

high niche
#

Yes, like I already told you in your other channel

median night
#

Ah I see

high niche
#

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

high niche
#

Before you ask: No, there are no tools that can do that for you automatically

median night
high niche
#

.py files aren't compiled in the first place

median night
high niche
#

You can open those with a notepad and just read the code

median night
#

I mean .rar

#

With py that he made into exe

high niche
#

That's a compressed file format

median night
#

Yes

high niche
#

You're gonna have to make your own tools to decompile whatever you got sent

median night
#

how do i save the page?

#

i'm there right now

#

downloading the page?

#

hm

high niche
#

Depends on what you want

median night
#

i wanna see the source

#

like the generator

high niche
#

Did you try:
Dev tools -> Sources?

median night
#

where are dev tools?

high niche
#

If it's not there, you can't get the source code

#

What browser?

median night
#

i'm using edge just on a VM

high niche
#

Usually in menu -> More Tools -> Developer Tools

#

Wha

#

o.o

median night
#

lolz

high niche
#

What kinda generator are you attempting to download??

#

Is there a reason you're using a VM?

median night
high niche
#

"random stuff"

#

:I

median night
high niche
#

Tells me sooooooo much

median night
#

plus i have the decompiling stuff and was doing that earlier

#

on the vm

high niche
#

And devtools for edge are either:

F12

or

Ctrl+Shift+I

median night
#

ctrl+shift+i worked

#

now that i'm here..

high niche
#

Time to start reading my dude

median night
#

ah i found it

#

nevermind lol

#

I found Developer Recources

#

No Developer Tools

#

it says status success?

high niche
#

What might that screen even look like?

median night
#

with a URL

high niche
#

Screenshot maybe?

median night
#

hows this?

high niche
#

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

median night
#

its just random stuff lolz

high niche
#

What "stuff"?

median night
#

brb.

high niche
#

3DLMAO Bruhhhh

#

Really?

median night
#

this is da thingie

#

MAP file, if needed

#

thats what the URL part says

high niche
#

Those are the things you need to use

median night
#

okay

#

i have elements, console, and sources open

high niche
#

All the files are in the "Sources" tab

#

Elements shows you the HTML

#

You'd find the button that runs the generation, and then figure out where that function is in the JS

#

If it's JS based