Jump to content

How can you config a Linux system from Web+php


SweetRush Coder

Recommended Posts

Hi Guys 

working on a project that i want to modify some system configs using web+php with account www-data 

i am hoping to create a web form that will have the name of the interfaces and the ip of the interface if Static or DHCP then have this form output its result to create a config file for /etc/network/interfaces 

This will allow me to config the different network interface on my linux computer from the web. 

Please post your ideas anything is helpful. so security is also important to note 

Link to comment
Share on other sites

Take a look at this first.  If you still wish to D.I.Y. then come on back.  I would ask this in the coding topics part of the forums since you will be asking for some coding help then.  Before going that route, you should see if the below solution would suite you.  Personally, I would put a web based PC admin tool as a list on local host only and use SSH to access it through port forwarding through SSH.  Secure SSH with a certificate based authentication with password auth turned off.

 

 

Link to comment
Share on other sites

8 hours ago, PoSHMagiC0de said:

Take a look at this first.  If you still wish to D.I.Y. then come on back.  I would ask this in the coding topics part of the forums since you will be asking for some coding help then.  Before going that route, you should see if the below solution would suite you.  Personally, I would put a web based PC admin tool as a list on local host only and use SSH to access it through port forwarding through SSH.  Secure SSH with a certificate based authentication with password auth turned off.

 

 

Its a project that i am trying to build and i trying to build it from bottom up. i have been looing in to php code stings that can do sending system commands like shell_exec(),system( command, return value ), exec() after trying most of them it will give error code 1 which is a permission problem. 

Link to comment
Share on other sites

Well been wanting a wifi pineapple for along time but because my country does not shop the pineapple so I try to get a raspberry pi and now creating a project called palm tree http://suetenaloia.com/projects/palm-tree-router/ still trying to build it and learning heap about php this is why I want to get these commands to I can build forms so I can config the network controls for my project 

Link to comment
Share on other sites

20 hours ago, SweetRush Coder said:

Well been wanting a wifi pineapple for along time but because my country does not shop the pineapple so I try to get a raspberry pi and now creating a project called palm tree http://suetenaloia.com/projects/palm-tree-router/ still trying to build it and learning heap about php this is why I want to get these commands to I can build forms so I can config the network controls for my project 

There is a console.php demo. I can't find the link... its a basic console you can imbed on your site.

 

I have a similar project. Running console applications and displaying live io stream to the web client in html form. Things like signal stregth, reaver attacks, mdk attacks, configuring of wifi devices etc.

 

For example if a button was clicked I could run `iwlist scan` and display the content in html format with a button for each essid and a connect button.

 

I'm using ruby on rails. Action::controller::live is the method for streaming live content... this allows me more control of the content I want to stream.

 

A basic example could be `ping google.com` and display the content to the web client. I could make you a working example.

 

so, my suggestion is ruby on rails.

Link to comment
Share on other sites

1 hour ago, i8igmac said:

There is a console.php demo. I can't find the link... its a basic console you can imbed on your site.

 

I have a similar project. Running console applications and displaying live io stream to the web client in html form. Things like signal stregth, reaver attacks, mdk attacks, configuring of wifi devices etc.

 

For example if a button was clicked I could run `iwlist scan` and display the content in html format with a button for each essid and a connect button.

 

I'm using ruby on rails. Action::controller::live is the method for streaming live content... this allows me more control of the content I want to stream.

 

A basic example could be `ping google.com` and display the content to the web client. I could make you a working example.

 

so, my suggestion is ruby on rails.

Yeah I have a index command that calls the wireless ap list with a php script that outputs the aps with the iwlist you have some ruby rail set for calling system and streaming to HTML 

Link to comment
Share on other sites

12 hours ago, SweetRush Coder said:

Yeah I have a index command that calls the wireless ap list with a php script that outputs the aps with the iwlist you have some ruby rail set for calling system and streaming to HTML 

Well. The data that I stream is raw, the method I use leaves the tcp connection with the client/server always open state. because of this the data will be seen at the same time it happens. If you run 'ping google', the client will see each line print in real time.

 

I Simply wrap the data with bootstrap tags for a slick looking display.

 

 

 

 

Link to comment
Share on other sites

  • 2 months later...

I would love to get my hands on a pineapple but due to the fact that i am from a country that delivery does not get to from hak5 , i live in an island in the pacific called Samoa. and very good with computers been following hak5 since it was ever started and ever since it was run some a small show room i was always happy to view information on it. but i have been trying to get my hands on a pineapple for along time. unable to get my hands on on i got a pi and now just turning it on as a tool of tools. currently its been built with the power of a VPN-Router over LTE as i am in a remote area with no access to any fiber or ADSL connection so using my cellphone as the GW to my lab of connections. and then alot of VPN tunnels with in all of it. 

Link to comment
Share on other sites

On 1/2/2018 at 8:58 AM, i8igmac said:

Well. The data that I stream is raw, the method I use leaves the tcp connection with the client/server always open state. because of this the data will be seen at the same time it happens. If you run 'ping google', the client will see each line print in real time.

 

I Simply wrap the data with bootstrap tags for a slick looking display.

 

 

 

 

Yep that the way i am going at the moment just working on getting the functionality down first then will work on the cosmetics later on with BStrap and some jquary

 

Link to comment
Share on other sites

38 minutes ago, SweetRush Coder said:

Yep that the way i am going at the moment just working on getting the functionality down first then will work on the cosmetics later on with BStrap and some jquary

 

It seems like your on the right path. if you have working examples I would like to see how you accomplish things.

 

I have taken a break From this with family life.

 

I have run into loads of problems that I will have to over come.

(Example) if I run a reaver attack from the press of a jquery button and open a client connection from another device to view the same tcpstream. There is alot of data management or tcpstream management that has to cover all situations that might happen...

 

I challenge you to run a reaver attack. :cool:

Stream the data. Close the browser. view the stream on multiple devices. topical behavior.

 

Ill get back to it when im done with school.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...