Giter Site home page Giter Site logo

Blank output about gitminer HOT 12 CLOSED

unkl4b avatar unkl4b commented on August 22, 2024
Blank output

from gitminer.

Comments (12)

danilovazb avatar danilovazb commented on August 22, 2024 3

i l0v3 y0u bro!

I'm out of time, my dad passed away recently, I'll do the update!

TKSSS

from gitminer.

unixfox avatar unixfox commented on August 22, 2024 3

@Robvred If you want to try my patch, here is how to do it:

  1. Get the value of the cookie user_session for the domain github.com and copy it. You can use Advanced Cookie Manager for Firefox for example.
  2. Download my patch on the root of the Gitminer repository.
  3. Edit the patch file and replace CHANGEME (at the 18th line) with the value of the cookie user_session.
  4. Open a terminal and navigate to the Gitminer repository.
  5. Execute this command:
git apply gitminer.patch
  1. Now Gitminer'll work perfectly.

from gitminer.

Robvred avatar Robvred commented on August 22, 2024 1

@unixfox Thanks 👍

But to avoid error Patch does not have a valid e-mail address It is recommended to use git apply gitminer.patch

from gitminer.

danilovazb avatar danilovazb commented on August 22, 2024

Yes, github make changes in their search page, I'm working on it.

from gitminer.

unixfox avatar unixfox commented on August 22, 2024

@danilovazb Any updates ?

from gitminer.

unixfox avatar unixfox commented on August 22, 2024

Sorry for asking again but do you have any updates on your work ?

from gitminer.

danilovazb avatar danilovazb commented on August 22, 2024

@unixfox Yes, the weekend do update

from gitminer.

unixfox avatar unixfox commented on August 22, 2024

I found that Github doesn't allow search code anonymously.
Github search code requires to be authenticated with an account.

@danilovazb You could make a quick fix by adding an argument to pass the cookie user_session.

from gitminer.

unixfox avatar unixfox commented on August 22, 2024

@danilovazb

I tried to pass the cookies arg to the requests module with my cookie and it's working great!

Here is my patch (quick dirty fix):

From b71561020b1bd55a2e71d1f96c80e77b27b935da Mon Sep 17 00:00:00 2001
From: Emilien Devos <[email protected]>
Date: Sun, 11 Dec 2016 14:40:40 +0100
Subject: [PATCH] fix

---
 git_miner.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/git_miner.py b/git_miner.py
index 986963b..6928ef9 100644
--- a/git_miner.py
+++ b/git_miner.py
@@ -53,6 +53,7 @@ class GitMiner(object):
         self.url = "http://github.com"
         self.user_agent = {"User-Agent":"Mozilla/5.0 (X11; Linux x86_64)\
             AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"}
+        self.cookie = dict(user_session='CHANGEME')
         self.args = parser.parse_args()
         if self.args.query is None:
             os.system('cls' if os.name == 'nt' else 'clear')
@@ -128,7 +129,7 @@ class GitMiner(object):
                 print(frescurinha.HELP + "+----------------------------------------------------+"+ frescurinha.ENDC)
                 self.saveOutput("+----------------------------------------------------+\n")
 
-            if self.config[self.args.module]['parameters'] >= 1:
+            if len(self.config[self.args.module]['parameters']) >= 1:
                 qtd_param = int(len(self.config[self.args.module]['parameters']))
                 qtd_order = int(len(self.config[self.args.module]['splitorder']))
                 split_param = self.config[self.args.module]['splitparam']
@@ -200,7 +201,7 @@ class GitMiner(object):
         self.nextPage(prox_page)
 
     def accessWeb(self,url_acesso):
-        acc = requests.get(url_acesso, headers=self.user_agent)
+        acc = requests.get(url_acesso, headers=self.user_agent, cookies=self.cookie)
         if " find any code matching" in acc.text:
             print(frescurinha.FAIL + "[-] We couldn't find any code matching %s\n" % self.args.query + frescurinha.ENDC)
             exit()
-- 
2.10.2

from gitminer.

Sceat avatar Sceat commented on August 22, 2024

$Ø $ÂÐ ŦĦØ

from gitminer.

Robvred avatar Robvred commented on August 22, 2024

Sorry for asking but I'm not shure, do you have update your work with @unixfox change ?

from gitminer.

danilovazb avatar danilovazb commented on August 22, 2024

GitMiner updated!
Add set cookie
Reformulated crawler for new github interface.

from gitminer.

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.