Skip to content

Communication between PHP and Python using json based flag

Notifications You must be signed in to change notification settings

KudosAbhay/PHP-Python-Communicator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"

About

Communication between PHP and Python using json based flag

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published