{"action":"opened","issue":{"url":"https://api.github.com/repos/s0md3v/Photon/issues/44","repository_url":"https://api.github.com/repos/s0md3v/Photon","labels_url":"https://api.github.com/repos/s0md3v/Photon/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/s0md3v/Photon/issues/44/comments","events_url":"https://api.github.com/repos/s0md3v/Photon/issues/44/events","html_url":"https://github.com/s0md3v/Photon/issues/44","id":347635189,"node_id":"MDU6SXNzdWUzNDc2MzUxODk=","number":44,"title":"Can't run photon outside of Photon directory","user":{"login":"sethsec","id":1268152,"node_id":"MDQ6VXNlcjEyNjgxNTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1268152?v=4","gravatar_id":"","url":"https://api.github.com/users/sethsec","html_url":"https://github.com/sethsec","followers_url":"https://api.github.com/users/sethsec/followers","following_url":"https://api.github.com/users/sethsec/following{/other_user}","gists_url":"https://api.github.com/users/sethsec/gists{/gist_id}","starred_url":"https://api.github.com/users/sethsec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethsec/subscriptions","organizations_url":"https://api.github.com/users/sethsec/orgs","repos_url":"https://api.github.com/users/sethsec/repos","events_url":"https://api.github.com/users/sethsec/events{/privacy}","received_events_url":"https://api.github.com/users/sethsec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-04T17:34:46Z","updated_at":"2018-08-04T17:34:46Z","closed_at":null,"author_association":"NONE","body":"This is the issue if you call the script from /home for instance: \r\n\r\n![image](https://user-images.githubusercontent.com/1268152/43678977-f5d1e932-97ea-11e8-8178-6c8d93928da8.png)\r\n\r\nThe two lines highlighted in hello are (print(os.getcwd()) and print(sys.path[0]) respectively.  As you can see, the second line is what will make the script work if you call it from anywhere.  \r\n\r\nFix:  on line 182: https://github.com/s0md3v/Photon/blob/master/photon.py#L182\r\nChange:\r\n```with open(os.getcwd() + ```\r\nto:\r\n```with open(sys.path[0] + ```\r\n\r\nquestions?"}}
{"actor":{"display_login":"sethsec"}}