kaotkbliss Posted December 16, 2018 Posted December 16, 2018 We make a lot of apps with a web page interface for various departments in the company to use. When writing or making changes to an app, we usually run the server code locally for testing changes. My boss wants me to automate this process by using Postman to send a set group of variables to the locally running server code, then compare the returned pdf with a control pdf to make sure they are still identical. Since the server code is running locally, it's hosted on "localhost:port" but javascript can't read a file at a path "localhost:port//somename.pdf" so I need to convert localhost:port to the absolute path where the local server script is actually running. Is there a way to do this? 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
Gianni Posted December 17, 2018 Posted December 17, 2018 try to use 127.0.0.1 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
kaotkbliss Posted December 18, 2018 Author Posted December 18, 2018 I started on a different route by using the http module to "download" the file to where I could use __dirname + /somepath then work with it from there. But now I'm having issues with trying to get the file hash/checksum I have a control pdf, which is the result of test variables being plugged into the app. whenever changes are made to the app, the new pdf with the same variables plugged in should still be exactly the same as the control pdf I've been messing around with crypto, but that seems to include the filename and the path in the hash it generates for the file, so it never matches. Also, when I changed 1 variable and created a new pdf, it's hash doesn't change, although I'm pretty sure it should since the contents of the pdf changed. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
kaotkbliss Posted December 20, 2018 Author Posted December 20, 2018 So the problem with the hash is that the software we use that outputs pdfs doesn't create them binarily (is that a word?) identical using the same variables so each time a pdf is created it gets a new hash. I was able to get around this by using the pdf2json module and grabbing the rasterization of each page, then comparing each array from both pdfs. Xandy 1 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
eaglesha Posted May 25, 2019 Posted May 25, 2019 (edited) I feel you should use 127.0.0.1, it works for you. Get access to instagram username and passwords and maybe teke help from there... Edited October 13, 2019 by eaglesha
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now