Code Monkey home page Code Monkey logo

Comments (25)

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024 1

Thats because a Unix path uses forward slashes ('/') but windows uses "\" so it cannot get the filename by splitting via '/' change that to
console.subtask('Loading {0}'.format(p_str.split('\\')[1]))

its just a print by the way so you could even comment that out.

I hope that you dont pull the latest changes since it completly break windows compatibility because of a unix shell script. i try to add a powershell script.

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024 1

I had multiple versions of python installed, each one with own selenium, webdriver and geckodriver using. Finally I found that the first geckodriver launching was an older version for python 2.7... Ive made updates to the latest 0.20 version for all python versions and everything works fine now. Dlib can be installed on windows , even it takes some time and patience. Ill check again in next days which solution really worked because I`ve tried many in a whole day :)

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

In theory yes. BUT
especially the dlib package was designed for Linux and its a pain in the ass for compiling dlib for windows. Here seems to be a tutorial
In short to install dlib:

  1. install cmake and and it to path
  2. install boost lib
    3 compile dlib and install the python bindings.
    Sounds simply but thats a pain in the ass.

So the answer is a maybe. I suggest that you spin up a Ubuntu VM which should work.
Sry.

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

Thank you. Ive managed to start the program after resolving other issued problems ( like cairosvg package error) After the faceook search is made, it crushes again:) Ill put here tomorrow the error and I`ll try solve it

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

You managed to install it on Windows? Thats awesome haha 👍

Sure i'll be happy to help. The google image search should come after the fb search. i dont see how a error could happen there. But i'll be happy to help if you posted the logs ;)

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

Instagram changed its Data Structure. So the instaLooter package broke for a bit. I fixed it by using the dev version of the package. This break the Windows compatibility because i'm using a bash script to launch instaLooter. ( i might add a powershell script later)

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

==> Enter the persons name to find on FB: temisan
==> How many jitters, higher is better [max 100]: 100
==> Opening Webdriver
-> Collecting Image URLs...(Page 1)
-> Collecting Images URLs...(Page 2)
-> Collecting Images URLs...(Page 3)
-> Collecting Images URLs...(Page 4)
-> Collecting Images URLs...(Page 5)

:: Starting Face Recognition
==> Loading known faces
Traceback (most recent call last):
File "eagle-eye.py", line 204, in
main(skipFB=args.skipfb, skipIR=args.skipir, skipY=args.skipyandex)
File "eagle-eye.py", line 95, in main
r.loadKnown(name)
File "c:\Python3\osint\EagleEye\face_recog.py", line 26, in loadKnown
console.subtask('Loading {0}'.format(p_str.split('/')[1]))
IndexError: list index out of range

I`m stuck here right now :)

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

==> Enter the persons name to find on FB: aurelian temisan
==> How many jitters, higher is better [max 100]: 100
==> Opening Webdriver
-> Collecting Image URLs...(Page 1)

:: Starting Face Recognition
==> Loading known faces
Traceback (most recent call last):
File "eagle-eye.py", line 204, in
main(skipFB=args.skipfb, skipIR=args.skipir, skipY=args.skipyandex)
File "eagle-eye.py", line 95, in main
r.loadKnown(name)
File "c:\Python3\osint\EagleEye\face_recog.py", line 26, in loadKnown
console.subtask('Loading {0}'.format(p_str.split('/')[1]))
IndexError: list index out of range

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

I just pushed a fix.
Since instagram changed something make sure to reinstall the requirements(actually just instaLooter)
Download the new version of the repo (or clone it).
So:

pip3 uninstall instalooter
pip3 install -r requirements.txt

Thank you for testing on Windows ;)

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

I`m stuck here now :)
:: Google Reverse Image Search
==> Opening Webdriver
==> New Image: https://scontent-otp1-1.xx.fbcdn.net/v/t1.0-1/p100x100/29178550_10213724586740659_33221308
-> Inserting Image URL
Traceback (most recent call last):
File "eagle-eye.py", line 204, in
main(skipFB=args.skipfb, skipIR=args.skipir, skipY=args.skipyandex)
File "eagle-eye.py", line 108, in main
g.collectLinks(img)
File "c:\Python3\osint\EagleEye\grabber\google.py", line 38, in collectLinks
input.send_keys(img_url)
File "C:\Users......\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 479, in send_keys
'value': keys_to_typing(value)})
File "C:\Users............\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 628, in _execute
return self._parent.execute(command, params)
File "C:\Users......\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "C:\Users..........\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: Expected [object Undefined] undefined to be a string

Should I change here in google.py file the Unix // with Windows \ at line 33-36 ?
"the elems = driver.find_elements_by_xpath('//[@id="qbi"]')[0]
elems.click()
time.sleep(1)
input = driver.find_elements_by_xpath('//
[@id="qbui"]')[0]"

Thank you for your support, too!

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

So does the browser open on the reverse image search? does he insert the image url? could you please describe what happens in the browser?

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

Yes, browser opens the reverse image search but it doesn't load/ insert the image url itself It remains blocked waiting for an image to be loaded

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

So it does successfully click on the Camera Icon on the page right?
So it fails focusing the Input Box for the URL and then i cant insert text ofcourse.

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

It seems very fine to me to load the image
image

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

So ok.
send_keys fails and it says the image is undefined but the debug message "==> New Image" clearly states that the url is a string...

try the following:
in grabber/google.py between line 37 and 38 change it so that it looks like the following

input = driver.find_elements_by_xpath('//*[@id="qbui"]')[0]
print(img_url)
input.clear()
input.send_keys("")
input.send_keys(img_url)
input.send_keys(Keys.RETURN)

this will try to print every image url it tries to insert. I believe that some of the image urls in the list are "undefined" thats why it cant type a undefined variable.
Try that and it should print "None" or "undefined" at some point. If thats true then i will add a check to ensure that we only enter strings.

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

I`ve made the changes in google.py line 37 - 38.. now I have:

" def collectLinks(self, img_url):
console.task('New Image: {0}'.format(img_url.strip()[:90]))
driver = self.driver
driver.get("https://www.google.com/imghp")
console.subtask('Inserting Image URL')
elems = driver.find_elements_by_xpath('//[@id="qbi"]')[0]
elems.click()
time.sleep(1)
input = driver.find_elements_by_xpath('//
[@id="qbui"]')[0]
print(img_url)
input.clear()
input.send_keys("")
input.send_keys(img_url)
input.send_keys(Keys.RETURN)
console.subtask('Searching for Image...')
time.sleep(cfg.timeout()) "

The generated error is:

:: Google Reverse Image Search
==> Opening Webdriver
==> New Image: https://scontent-otp1-1.xx.fbcdn.net/v/t1.0-1/p100x100/29178550_10213724586740659_33221308
-> Inserting Image URL
https://scontent-otp1-1.xx.fbcdn.net/v/t1.0-1/p100x100/29178550_10213724586740659_3322130830564927756_n.jpg?_nc_cat=0&oh=6f223647feb73d5dd88f57706e3883f4&oe=5B728F02
Traceback (most recent call last):
File "eagle-eye.py", line 204, in
main(skipFB=args.skipfb, skipIR=args.skipir, skipY=args.skipyandex)
File "eagle-eye.py", line 108, in main
g.collectLinks(img)
File "c:\Python3\osint\EagleEye\grabber\google.py", line 39, in collectLinks
input.send_keys("")
File "C:\Users.........\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 479, in send_keys
'value': keys_to_typing(value)})
File "C:\Users........\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 628, in _execute
return self._parent.execute(command, params)
File "C:\Users..........\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "C:\Users.........\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: Expected [object Undefined] undefined to be a string

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

You can undo the changes.
It has to do with firefox.
so ok i found something that has todo with firefox.
Make sure to use the latest Firefox version and download the Geckodriver seperatly and change the path in config.json

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

58.0.2
Firefox Release

February 7, 2018

geckodriver-v0.20.0-win64

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

and you changed the path in config.json?

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

yes, Ive changed. Otherwise it wouldnt open the browser, the facebook image download and recognition phase work very nice. It crushes when loading the imgs urls. I think the script doesn`t get/paste the img urls from the temporary folder created into the browser window

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

I know that. Some people had problems regarding the selenium send_keys function with a incompatible math of firefox and the geckodriver version
by the way the latest firefox version is 59.0.1 atleast on Linux. Try updating yours.

If that doesnt help then i have no idea...the last resort would be to spin up a Linux VM with Ubuntu which should work since it was tested by me.

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

I ve made all updates..still not working. I'll try further to find a solution to the send_key problem. May some older versions are working 😉 meanwhile..I'm sure that future Chrome version of your script will work as a charm. Whenever it's possible, of course .

from eagleeye.

fiuderazes avatar fiuderazes commented on August 30, 2024

Final results is that it`s working on windows 10!
Problem was the geckodriver version!

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

So which geckodriver did you choose? ;)
I'm curious of how you installed dlib on windows

from eagleeye.

ThoughtfulDev avatar ThoughtfulDev commented on August 30, 2024

Thats awesome. If you want you cant write a short tutorial or link a tutorial which worked for dlib so i can add it so windows users can enjoy this tool too ;)
Or you can make a Pull Request haha

from eagleeye.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.