LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-13-2022, 08:59 AM   #1
vinnie098765
LQ Newbie
 
Registered: Feb 2022
Posts: 1

Rep: Reputation: 0
obtain source code with terminal


trying to obtain source code for a particular website using pop OS 21.04
 
Old 02-13-2022, 09:04 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,901

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
ask the maintainers, or check the website, probably documented (which engine is used).
Otherwise what is your goal? What do you want to achieve at all?
 
Old 02-13-2022, 09:25 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by vinnie098765 View Post
trying to obtain source code for a particular website using pop OS 21.04
A Web site or a single web page?
You can download any web page to your hard drive either with your browser (<Ctrl>-<S>) or via e.g. curl or wget:
Code:
curl https://somesite.org/page.html
That is the source code of that page.
 
Old 02-13-2022, 07:38 PM   #4
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
You can also download many websites with wget. Not all though since javascripts and php are a different story in that scenario.
 
Old 02-14-2022, 01:52 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by computersavvy View Post
You can also download many websites with wget. Not all though since javascripts and php are a different story in that scenario.
While you can download complete sites with wget, that's arguably not the "source code of the site", just the code of all its pages.
It really depends on your definition of "site" - it could mean "the software running the site".
OP didn't clarify and possibly didn't put too much thought into their question anyhow.

Javascript is client-side scripting, so ALL of it should be openly available - usually in additional links inside the HTML page, just like e.g. CSS. It's often minified/obfuscated, but if you know how to read it you should be able to completely reconstruct the page in question.

PHP is server-side scripting and is and will always remain completely opaque to the client.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script - obtain current workdirs of all konsole terminal/sessions Ishrimak Linux - Newbie 5 01-17-2011 06:47 PM
is it possible to obtain C code from module (file .o)??? webquinty Linux - Newbie 5 11-03-2008 05:32 AM
How to obtain Source Code theunixwizard Linux - Newbie 2 05-03-2008 03:28 PM
How to obtain source code in FC6 anirudhamshinde Linux - Kernel 1 01-02-2007 08:15 AM
obtain Gnome same game source code linuxmandrake General 1 12-26-2005 11:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration