Comments (12)
i l0v3 y0u bro!
I'm out of time, my dad passed away recently, I'll do the update!
TKSSS
from gitminer.
@Robvred If you want to try my patch, here is how to do it:
- Get the value of the cookie
user_session
for the domaingithub.com
and copy it. You can useAdvanced Cookie Manager
for Firefox for example. - Download my patch on the root of the
Gitminer
repository. - Edit the patch file and replace
CHANGEME
(at the 18th line) with the value of the cookieuser_session
. - Open a terminal and navigate to the
Gitminer
repository. - Execute this command:
git apply gitminer.patch
- Now Gitminer'll work perfectly.
from gitminer.
@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.
Yes, github make changes in their search page, I'm working on it.
from gitminer.
@danilovazb Any updates ?
from gitminer.
Sorry for asking again but do you have any updates on your work ?
from gitminer.
@unixfox Yes, the weekend do update
from gitminer.
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.
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.
from gitminer.
Sorry for asking but I'm not shure, do you have update your work with @unixfox change ?
from gitminer.
GitMiner updated!
Add set cookie
Reformulated crawler for new github interface.
from gitminer.
Related Issues (20)
- Cookie managment HOT 3
- Not working HOT 1
- Script terminated when running as a thread HOT 3
- error msg each time I am launching GitMiner HOT 1
- error message HOT 1
- Please HELP me to find some results in this programm! I will pay 25Euro if someone can help me! HOT 2
- Docker setup broken HOT 3
- Error while execute the script HOT 9
- Should I use centos to install or UB to install? HOT 1
- 执行命令时出现问题 HOT 2
- What do I put in the --cookie paramter? HOT 1
- IndexError: list index out of range HOT 1
- How to sort the output file containing results correctly
- Error HOT 3
- no data HOT 3
- Dependencies issue on python in kali linux 2019.4
- error executing script with encoding HOT 3
- Image in the readme HOT 3
- Error in example Query: IndexError: list out of range HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitminer.