Follow us on Twitter!
Imagination is more valuable than knowledge - Albert Einstein
Wednesday, April 23, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 27
Guests Online: 25
Members Online: 2

Registered Members: 82885
Newest Member: ConiBE
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

Python?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-02-11 23:30
Hey, i've got a friend thats trying to do her uni assignment with a bit of pythoon and i don't have a clue myself.

she wants to get this code to work but can't

Code
>>> for line in open ('auth.txt'):
if 'oracle' in line:
print "lines : ", lines





she said shes trying to find out how many times people attempted to log into the oracle account and create a log of it.

Could anyone shed some light on this please?
she needs this done by tuesday

Thanks




Author

RE: Python?

stealth-
Member



Posts: 1003
Location: Eh?
Joined: 10.04.09
Rank:
Mad User
Posted on 25-02-11 23:36
Um, you need to be more specific with what you want the output to be. Do you want it to output the number of lines that include the word "oracle", or print out the lines that include the word "oracle"?

That code is a mess, she really needs to pay attention in class o.0


The irony of man's condition is that the deepest need is to be free of the anxiety of death and annihilation; but it is life itself which awakens it, and so we must shrink from being fully alive.
http://www.stealt. . .
http://www.stealth-x.com
Author

RE: Python?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-02-11 23:43
Output the lines the include oracal, i belive.

Code
That code is a mess, she really needs to pay attention in class o.0





And i could agree more lol but shes struggling with it
Author

RE: Python?

spyware
Member



Posts: 4192
Location:
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 25-02-11 23:44
Didn't HBH have a stance on stupid homework questions?



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
[center]�Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?� - Ebert[/ce
Author

RE: Python?

stealth-
Member



Posts: 1003
Location: Eh?
Joined: 10.04.09
Rank:
Mad User
Posted on 25-02-11 23:52
Ragamuffin wrote:
Code
>>> for line in open ('auth.txt'):
if 'oracle' in line:
print "lines : ", lines





Okay, tell her to look at the last line of her code.
"lines" is not a variable.....


The irony of man's condition is that the deepest need is to be free of the anxiety of death and annihilation; but it is life itself which awakens it, and so we must shrink from being fully alive.
http://www.stealt. . .
http://www.stealth-x.com
Author

RE: Python?

Arabian
Banned



Posts: 332
Location: inside you.
Joined: 22.09.10
Rank:
Apprentice
Posted on 26-02-11 02:43
>>> for line in open ('auth.txt' ):
if 'oracle' in line:
print "lines : ", lines


Is she retarded? If her aim is to print out a value every time a user signs into an Oracle account,

A ) there is no account provided to scan for input.
B ) She's attempting to scan and print out how many times 'oracle' occurs in 'auth.txt'.

Either you heard what she wanted to do wrong, or she's so far off that I don't even wanna help.


G'bye y'all! I was an asshole, So korg banned me.

Edited by Arabian on 26-02-11 02:44
Author

RE: Python?

ynori7
Member



Posts: 1486
Location: #valhalla
Joined: 08.10.07
Rank:
God
Posted on 26-02-11 05:02
Ragamuffin wrote:
she said shes trying to find out how many times people attempted to log into the oracle account and create a log of it.

You can do this from oracle:

Code
select USER_NAME|| - ||MESSAGE|| - ||to_char(LOG_DATE,dd.mm.yyyy hh24:mi:ss)|| - ||IP_ADDRESS Login Failures
from ORASSO.WWSSO_AUDIT_LOG_TABLE$
where log_date > (sysdate - 7)
and MESSAGE = Login failed
order by log_date;




You may have to tell the database to audit login attempts. Just google "oracle audit failed login attempts" and you'll find explanations.


halls-of-valhalla.org/images/affiliateLogo.png voodoorage.halls-of-valhalla.org/images/smallLogo.png
i537.photobucket.com/albums/ff338/ynori77/archenemysig1.jpg
ynori7 http://halls-of-valhalla.org