Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.29 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.29 KB

PHP-Python-Communication

What's Done: Writing JSON File using PHP >---> Reading JSON File using Python

To install php5.6: Use these commands:


sudo add-apt-repository ppa:ondrej/php
sudo apt-get install software-properties-common
sudo apt-get update
sudo apt-get install php5.6
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml

How to Use:

  1. Use all files under your username (not root).
    Do this by using sudo chown yourusername:yourusername -R PHP-Python-Communicator/

  2. Provide Executable permissions for flag.json and json-generator.php
    Do this by using sudo chmod a+x filename and then sudo chmod 777 filename

  3. Keep running the python script in the background using python3 json-checker.py

  4. Open flag-sender.html file from your browser.


That's it!!!
You have changed the flag value from your flag.json.
Now open your flag.json for confirming change in values.


If Value sent from flag-sender.html is '0', json-checker.py will print "Will Skip Code"
If Value sent from flag-sender.html is '1', json-checker.py will print "Will Execute Code"