#programming
1 messages ยท Page 29 of 1
same here
I guess you should watch a video explaining about regex
In this regular expressions (regex) tutorial, we're going to be learning how to match patterns of text. Regular expressions are extremely useful for matching common patterns of text such as email addresses, phone numbers, URLs, etc. Almost every programming language has a regular expression library, so learning regular expressions with not only ...
Then you will get a rough idea about how to do it
Goodluck
i remember spending 8 hours trying to figure this out in a ctf once
completely fried my brain
Thanks bro ๐
Gave +1 Rep to @dusty ore
no prob
ngl at this point i feel like manual labor is better unless you've got an absolute aircraft carrier of a data set
well it has 1.2M lines so finding another option is the best thing to do i gues haha
regex isnt gonna do it for me with my knowledge atleastt ๐
Thanks for the help mate ๐
selecting the 5th comma somewhere could be done by matching the first 4 and then looking for another one, using {n} as a counter
I have no clue what to do so I ask here, I have made a portscanner on python via ubuntu Linux VM, and It works great, but when I tried to run the script on my main os (windows) it didn't work, and cause some weird issues
if your using a system library i.e it takes system commands, then that would only work for that operating system
Iโve used the re, socket, multiprocessing, colorama, timeit
Do you think there is some kind of issue with those module on windows
?
Cuz my code compiles just fine, but the execution is weird
All but colorama are (IIRC) built-in, so they should be fine.
If you don't post screenshots of what the weird behavior is, we aren't able to diagnose and troubleshoot with you
Hey Guys! I have a Question.
I Don't know wich Programming Language i need to lern first..
What would you Recommend?
python is a good language to start with, but it depends on what you are trying to do
I think for Pentesting would be Automatisation great
Powershell is really for stuff running on a windows machine, doesn't matter what you're throwing at it remotely
Thank you Guys!
What do you think would be a great second language ? C or C++?
well if you're trying to write botnets that do make typos then C++ maybe
Thank You Brother!
What

Depends what you want it for again, if you wanna do weird Windows pentesty stuff then Powershell/C#
Okey i think than i go first for python and than for PowerShell
Just make sure you learn OOP IMO, it will help with powershell later on
Thank You
is codecademy a good way to learn python?
I think that depends on how you learn tbh
ohh wait
codecademy have video resources too dont they
im pretty sure yeah
well then i'd say try it out for your self
yea ill try a few courses and see how it is
Does anyone here know Julia? Can I get a vibe check?
Sorry Bee, that one isn't one I've done anything in.
Sure, she's lovely
I'd use concurrent.futures
post code
I started there but found I learn better just doing things with it. I built an app for work recently (Second time trying to build an app, first that was decent enough to be used). Between, freecodecamp(more of their YT stuff than the website), some foundational stuff on codecademy and A LOT of stack exchange and documentation, I made something that works well enough.
anyone knows how to communicate with upnp serveces ?
Which is the iso file I need to download for kali Linux using VMware
For virtualbox i just use the bare metal iso dunno if that s the same with vm ware
the vmware download isnt an iso its an ova image
You can grab the iso and install the thing manually
Or you can get the ova image and import that
What do you guys prefer most baremetal install or VM for your attack machine .. ?
I prefer VMs. Because I can packed up the entire VM disk image into an ISO and hand it off as a deliverable
Also, sandboxing is part of a healthy ecosystem to manage all the things.
Also means you can make mistakes and not have to worry about destroying your baremetal machine
That too
Borking a system bad enough can require a re-image; if it's a VM, snapshops are a super easy way to recover with minimal loss
yeah .. that's true
imo, I prefer using a VM anyway, feels safer. I probably wouldn't do pentest stuff on my host. If I did get something on my VM, it's enclosed and an attacker would be trapped there.
I rarely install anything to my host too and I have good anti-virus.
I do that for almost everything, Jabba. the only systems I don't run in a VM are my gaming PCs
I do like the idea of having a machine designated to pentesting but it probably would just be used for that.
I think antivirus are pretty much useless if you are that contained and don't install anything on your host
SecureVNC and SSH let me do practically everything I would on bare metal, but on a VM in my lab instead of on my desktop
I install stuff, but only things I know and trust. Always good practice to check what you're installing and scan it. You never know.
Depends on what you probability of being targeted by spearphishing or poison docs being passed around
A lot of what I install nowadays is pretty much gaming related and I would do so through steam. Although, I don't game that often.
I use my Macbook for work so I don't really install anything there either.
A lot of cloud based data storage services perform AV scans, it's actually slightly harder than you'd think to pass around a poison pdf.

And most of what I'm looking for in AV is just an alert that something tried to change a protected file
It's not useless, but i'm low-risk to be infected just due to my general system hygiene.
Suspicious torrents, unknown source game downloads, sketch websites are all things on my no-no list. I have a blacklist in my pi-hole specifically for warez and related garbage.
But what I prefer is a device laptop/desktop that has a baremetal installation of either Kali, Ubuntu, parrot or any other Linux distro that I use only for pentest and stuff and my regular work device with a VM in it
How to hack
If you wanna learn that you are in a right place .. THM has lots of resources, machines to practice and community of amazing people ready to help you in your learning endeavor
That is exactly backwards for how to segregate potentially sensitive data.
I typically have a VM set up for each project, keeping the environment for each completely separate.
Ok so how should i get started
Do all variables in bash have to be in all caps?
nop
No, but it's convention
Matrix class as a two-dimensional array.
class Matrix {
constructor(width, height, element = (x, y) => undefined) {
this.width = width;
this.height = height;
this.content = [];
for (let y = 0; y < height; y++) {
for (let x = 0; x < width; x++) {
this.content[y * width + x] = element(x, y);
}
}
}
get(x, y) {
return this.content[y * this.width + x];
}
set(x, y, value) {
this.content[y * this.width + x] = value;
}
}
what is "element" doing here?
hi, How can I run python script from anywhere in Linux?
do you mean from a different directory python <location of script>\<script>
yes
just add the directory path of the script
yes but i want like just the name of the file
if you aren't in the same directory, you need to add the directory path before the scriptname
nmap has a specific folder that it stores the nse scripts in
so you mean i cant?
not an nmap expert, but the documentation might give some guidance
The easiest way to do this with your own files is by adding whatever folder it's in to the path, and making the python file executable with a shebang at the top of the file.
It's really just a lot of work for very little payoff. Just type out the whole thing: python /PATH/TO/SCRIPT/file.py.
Unless you're actively developing a python project where you want to call it by its name, there are very few reasons I see why you would need to do that
Or symlinks
I always forget that symlinks exist
I don't know what language this is, but it looks like element is a function reference provided to the constructor as a parameter, and the function called within the constructor.
hey guys, can i script the OSI_DUNGEON_ESCAPED? I dont know how i speak with the character... ๐ https://static-labs.tryhackme.cloud/sites/osi-model-game/
or, is there a room for that... or is that possible?
hey i am new to machine learning and i am creating a breast cancer detection thing but i have come across this error. When i run the last code cell this error keeps on showing. Epoch 1/1000
TypeError Traceback (most recent call last)
<ipython-input-34-a5e6a9bff808> in <module>()
----> 1 model.fit(x_train, y_train, epochs=1000)
2 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/def_function.py in _call(self, args, **kwds)
915 # In this case we have created variables on the first call, so we run the
916 # defunned version which is guaranteed to never create variables.
--> 917 return self._stateless_fn(args, **kwds) # pylint: disable=not-callable
918 elif self._stateful_fn is not None:
919 # Release the lock early so that multiple threads can perform the call
TypeError: 'NoneType' object is not callable
[07:46]
i made this with google collab in python. https://colab.research.google.com/drive/19G-e-uTGvX4El62vIkn5WMoRR3pTY00h#scrollTo=NAtXjaF4UPbO&uniqifier=5
!rule 3
Rule 3: No excessive self promotion. Linking to another discord server is strictly prohibited, unless you have the infosec-developer role and the server is being linked as a resource to provide help with a specific tool (e.g. linking the Ciphey official Discord server for help with Ciphey). Don't turn it into advertising.
Not the place to advertise @elfin spruce :)
Oh sorry
Np :)
arrow keys ig
and then space to enter
You can use aliases
How bro?
Ola, Can someone explain to me about Unions in C++ (How they work, How to use them, etc.)?
Is java good for learning hacking and if not then suggest me some like 1 language for both community and pentesting purpose
Python
Java can be used for applet attacks, but generally python is your best friend
Oh i see needa master that
It takes time. Learn it as you go. Powershell and Bash will also be super useful to learn
Java applets are a historical thing really
Applets are dead dead dead now.
Aw

Read this first: https://en.cppreference.com/w/cpp/language/union
If union still doesn't matter sense, please ask some more clarifying questions
I've a question : in order to understand TCP/IP networks functioning, should we spend a lot of time in learning how to cut addresses ranges ?
Are you talking about classless network design? Subnet specification is a huge area of understanding IP based networks.
@magic falcon ๐
wdym by classless network design ?
it helps to understand how people and businesses organize their network topography, usually IP addresses are separated into groups with subnetting, so it does help a lot to understand what a subnet is and how people create them and use them in their infrastructure
Hey all,
recently, I programmed a keylogger and I used 'pyinstaller' to convert the file from .py to .exe.
But when I want to run it on windows, this errorbox shows (below).
So I tried to turn off virus protection in windows defender, but that didn't help.
Than I tried to turn on developer mode in security setting, but it didn't help either.
I even try to encode the python script to base64 in the belief, this could
bypass this problem, but no results.
Does anyone know, how to fix this problem?
thx
Depends. What's the keylogger for?
well, it's capturing keys, write them to the file and then send the file to email
And who, pray tell, were you intending to use it on?
educational purpose, just a project, really
Really? Awfully malicious choice
well, I'm starting at learning python and I wanted something easy to start ๐
sooo, do you know how to fix it?
ur a girl ๐ฎ
About 50% of the planet will be female. It's not that uncommon -- you can pick your jaw up off the floor smh
ok
Word of advice: probably better not making a scene when someone says something like that. It does not make you look good.
ok

I just don't know what to do, I tried everything I know but the error is still there. I would be grateful if you could help me.
took them long enough
We ain't helping with something that has precisely no legitimate uses when all we have is your word that it's educational. I'm sure you're telling the truth, but there's no way to confirm that ๐คทโโ๏ธ
It's like selling a stick of plastic explosive to a random person off the street. Sure, they might (as they claim) just want to study it, but more likely they want it to blow something up
if you didn't notice, there is a whole page learning this thing. It's domain is "tryhackme.com" and admins of this page are also giving information to everyone without knowing, what it will be used for.
Pyarmor??
thanks, I will try it
Gave +1 Rep to @strong bison
There's a significant difference between teaching things that can be used maliciously, and things that can only be used maliciously.
Hi, I want to share with you a mini-project of mine (any comment will be appreciated)
https://github.com/eliranCoding/portscanner
not a fan of multiprocessing, personally
This is good first issue if you want to contribute to lemmeknow ๐ฆโค๏ธ.
We need some comparison and benchmarks for performance compared to PyWhat!
You can add some more comparison if you got idea โบ๏ธ, hoping to see PRs.
hey I am coding a small page and I was wondering how I can make the page unscrollable
overflow: hidden; should do ot IIRC
Thanks
oops, this is unrelated to thm, I'll probably get in trouble if I ask here, nevermind sorry x.D
there's a bit more leeway here
Is there anywhere that takes the time to break other people's(or their own) code down line by line (or block by block) to explain what is going on? Is there such a thing?
Yes lol
Idk, but pythontutor just goes every line of code when you run the code on it. So if it helps you understand what each line does, and if there are any errors it shows you where and when the error occurs
Idk anything that does more than that, hopefully that helps though
@static night , that'd actually suffice I think.....I'll look into it. Thanks ๐
Gave +1 Rep to @static night
My brain turns off when it comes to making code because it feels so non-straightforward...
No problem๐
so I am trying to reverse engineer how other people decide what goes first, second, third, so on
Ah fairs, good luck. And lmk if I can help in any way
I did a codeninja exercise where it wanted me to list..I defined before and not after..and was told it was wrong lol..every since it's been bugging me
eh?
it helps if you know exactly what it is you want to do, then it's a matter of breaking everything down into bite-sized bits, and preferably testing
hi! i'm new around here. Could someone tell me where to start the studys?
Hello, I suggest you to read #start-here in the first place and ask us your questions if you have any ( more likely in #infosec-general )
Hello people, I need a bit of help win WinAPI. I am trying to write a program to execute a shellcode(for example, launch calc.exe)
I generate the shellcode with:
msfvenom -f c -p windows/exec CMD="C:\windows\system32\calc.exe" -b '\x00'
And the cpp script looks like this:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
unsigned char payload[] = <SHELLCODE>;
void * exec_mem;
BOOL rv;
HANDLE th;
DWORD oldprotect = 0;
unsigned int payload_len = sizeof(payload);
// Allocate a memory buffer for payload
exec_mem = VirtualAlloc(0, payload_len, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
printf("%-20s : 0x%-016p\n", "payload addr", (void *)payload);
printf("%-20s : 0x%-016p\n", "exec_mem addr", (void *)exec_mem);
// Copy payload to new buffer
RtlMoveMemory(exec_mem, payload, payload_len);
// Make new buffer as executable
rv = VirtualProtect(exec_mem, payload_len, PAGE_EXECUTE_READ, &oldprotect);
printf("\nHit me!\n");
getchar();
// If all good, run the payload
if ( rv != 0 ) {
th = CreateThread(0, 0, (LPTHREAD_START_ROUTINE) exec_mem, 0, 0, 0);
WaitForSingleObject(th, -1);
}
return 0;
}
I compile it with x86_64-w64-mingw32-g++ on Linux and cl.exe on Windows but both give me the same error. Any suggestions? ๐
Does anybody familiar with Java/Kotlin/android here?
You should ask your question directly, so you won't wait unnecessarily
Ask your question
Can't help if we don't know what you want
Do anyone let me know about how to reduce the** font size** of any text ?
Because I am making a discord python bot and the text seems relatively bigger.
This is more than a question
i need some help with a project
Anybody with good knowledge of android/Smali please dm me
I need some help with a reverse engineering project
Thanks in advance
try:
# something
except some_error:
# I fixed the exception here and wants to try again. that's why everything is in a while loop
continue
else:
# somethings
finally:
# somethings
break
problem is that it ignores the continue statement in except block and jumps into the finally block which has the break statement, and breaks out of the loop
I want to try again after fixing the exception in except block
any solutions?
it works if I omit the finally block
but I don't want to exclude finally block as it does some important tasks which I want to perform with or without exception
que
I might be a bit uneducated but afaik try and except are completely seperate to else. if you try something and it works, it carries on in that bit of code, but if it hits the except, it goes through the except bit. There is no else to that, so maybe try add an if in there with else ifs?
while True:
try:
#do something1
except some_error:
#do something2
print("try and except completed")
#move onto rest of code
if condition == met:
break
something like this yes? ^^
But I want to run code in try block again just after finishing except block code
this is the normal try and except thing.
try:
num = 'z'
assert num / 2 == 6
except:
print("que?")
else:
print("code go brrr")
finally, is always going to happen, hence why its always breaking.
try:
num = 'z'
assert num / 2 == 6
except:
print("que?")
else:
print("code go brrr")
finally:
print("ends up here")
Uhmm... I know how try and except works but idk why continue in except was ignored
Anyways, my goal is to retry after running the code in except block. That's all
I already specified that I don't want to remove finally. It's important ๐
everytime, a try block is executed, it will run straight into the finally
just put the code in??? (without the finally)
finally will always execute
I will try without finally. It works I know.
Thanks ๐
I was actually opening a file in read mode inside try block
If file does not exist then create the file in except block
And then wanted to try again
Finally black was closing the file
Maybe now you understand what I want to do @verbal yacht @steady gazelle
Yeah now I do understnad, one mo
i see, yeah, using finally was a good idea to close the file
Why don't you just check if the file actually exists in the first place?
if my_file.exists():
with something like that ^^
you could, iirc just do file = open("myfile", "w+")
w+ would put the pointer at the beginning of the file to read from.
but opens as reading and writing
you could also use a+
which i think is more sutiable
it will create a new file, or opens an exiting file. but the pointer is put at the end.
what is my_file here? file object
tell me I don't know about exists() method
thanks, exactly what I wanted ๐
Gave +1 Rep to @verbal yacht
this would do the thing. ๐
๐
pointer go to start using file.seek(0)
yep
btw what is this? still unclear to me ๐
oh i think they're confusing it with the os.path.exists() method
yeah I googled it. i think os.path.isfile(path) would be better
that is a good solution
anyways, problem is solved I guess. thank you both ๐
how do you pick which license to put a project under? I was looking at just using "The Unlicense" but I see some people saying it's bad for open-source - I just want all of my stuff to be freely available to copy/modify/use in perpetuity
I never made such project but what about this:
https://choosealicense.com/
Non-judgmental guidance on choosing a license for your open source project
The finally block will always be executed, regardless of the results of the exception handling
event when I type 'continue' in except block?
continue means jump to next loop
I usually use MIT, but I hear the apache license is better
The finally block seems to override, or is executed before the continue. In any case, this sort of handling isn't very clean
Thanks!
Gave +1 Rep to @solar jewel
GPLv3 and derivatives are the plague
And I mean literally the plague.
Creative Commons licenses shouldn't be too bad either though
gotcha, I will probably just slap an Apache license on the stuff I have already, I didn't realize no license is no bueno
It's a cya type thing
the bit I like with the GPL licenses is that it seems that any modifications mean that the updated source code needs to be available
The problem with GPLv3 is that merely using a GPLv3 component means that code must then also be licensed under the GPLv3
... try:
... open('wev')
... except:
... print('hello')
... continue
... print('hello1')
... finally:
... print('finally')
... break
I ran this piece of code and output was:
hello
finally
doesn't make sense to me ๐คทโโ๏ธ
AGPLv3 is even more infectious
Even without license attached, your code is still copyright by you though. proving it's yours might be more problematic though
The WTFPL is amusing
more amusing than the HTML error RFC?
Probably not
IIRC no license means assume all rights reserved
im sure this has been asked 500 times already but since im struggling to find good advice on reddit, stackoverflow etc. im gonna ask it here.
What course would you guys recommend for learning assembly from scratch for the purposes of binary exploitation / reverse engineering? Should I learn C first? (I know python and js)
https://stackoverflow.com/questions/4081330/how-do-i-modify-the-system-path-variable-in-python-script
if you want to edit the path vairable in python this will be helpfull
Hey everyone
I have some programming skills and i want to create tool for hacking which i will able to use it for terminal direct
Ps: i can create tool in python
But what should i do to make it usable in terminal
Ex:- MYTOOLNAME {some_values} -p {some_values}
(Something like this)
So you want to parse arguments?
Take a look at sys.argv, either look it up in the docs or just google it
andddd argparse should make all of that a lot simpler, take a look https://www.tutorialspoint.com/argument-parsing-in-python
Every programming language has a feature to create scripts and run them from the terminal or being called by other programs. When running such scripts we often ...
Thanks
I ran this and it's not giving any output, why so?
a = 9 ** 99999999999999999999
print(a)
edit: so it turned out there's a fix integer value limit. But can't I find how can I Increase it or print this value.
I dont get how that work (sys.maxvalue), but I got to know that it'll print out the value after some time, but will eat up resources and memory
At least in the USA, the course in a typical college Computer Science program that covers assembly (and computer hardware) in depth is often called โComputer Organizationโ
Unfortunately thatโs not a specific recommendation, but maybe itโll be helpful for googling or looking at potential books?
You could also try diving in head-first and learning as you go, which will be a bit harder in some ways, but will teach you things you know youโll specifically need for RE
Appreciate the answer, thanks
Gave +1 Rep to @thorn moon
Yeah I did kinda dive in head first and learn as I go
im picking things up fast
this cheatsheet is the perfect middleground between condense and still beginner friendly
lol cursed
What the...
is anybody well versed in java?
Many of us. Please just ask your question, and someone will hopefully chime in.
hello
The "ret" instruction in assembly is "Pop return address from stack and jump there"
But how can that be? I thought the only way you can pop something off the stack is if its at the top (first in last out)? Is the return address always at the top of the stack? How? Also theres so many pointers. base pointer, instruction pointer, stack pointer. someone care to ELI5 difference between the pointers? I have a rough idea but need to drive it home
- if I write some C code and allocate 500 bytes of memory, the assembly code wont show how much is being allocated, or its showing but not 500. how?
Each register stores a pointer for a reason - some exercises that will help you understand what is happening is to walk through how the stack changes when a function is called, when a loop executes, when a decision happens, when variables are declared, and when a function exits
C doesn't render to assembly directly, unless you are using a really weird toolchain.
ah
you can compile the C to native code, then use a disassembler to see what equivalent assembly code could be
Compilers make a lot of decisions, especially with respect to optimization. It's the most successful tool in computer science
Right, but with all that efficiency = harder reverse engineering
Not necessarily
more stuff stripped away
Because it renders into more recognizable patterns
but the stack thing - you can always only access whatever is at the top, right?
The hardest ASM is written by people who are just learning, because they don't understand good conventions, best practices, nor good style
Nope
The exercises I listed will show you exactly what you want to know if you pay attention and go slow
list me please
aite cuz the first thing any educational video says about stacks is that its first in last out data structure
A stack is commonly used in that way for adding and removing with push and pop. Accessing the stack is a different operation than either of those.
aaaaaaaaaah
The RPN calculator kata is good for understanding stacks as a data structure
In the end it's usually implemented as an array, or a deque
the main data stack isn't usually treated as a pure data structure stack though
random access is required, just due to how allocation in a function in organized
Sorry if this is off topic, still new to the channel.
Is it possible to install kali on my 970 Evo plus(I have a usb-c adapter so it's portable)
And use it on multiple devices? Say if I'm at home and wanna use it on my desktop. Then when I travel can I plug it into the laptop and boot it up?
I know their is a kali usb live. But will that work?
Once again my bad if this is on the wrong channel ๐
Well try it out I would say
usb live means you boot it into memory and not persisting it on the disk
Yea I did, it worked. Only for the laptop tho when I plugged it into desktop it would say something like no access filesystem restricted or something. I'll reinstall and try it again. I basically installed usb live to my thumb drive. Then used easeus disk copy to the m.2 it booted up and worked, I did updates unplugged it from laptop and plugged into desktop and got nothing but errors about permissions. Heh
Why would you copy an iso file over ? xD
Think at this point I'm just gonna make a drive for each system with kali seems a lot easier then trying to get 1 drive to work with both systems.
I installed usb live onto my SanDisk 256gb usb. Then did a disk copy. I mean it worked but only for 1 system lol
But you cant install usb live
Ahh I'm starting to understand
The whole point of a live is that it isnt persistent but it is a quick boot
I followed the add persistance to it then did the disk copy
You need to install kali on a disk in order te keep all your changes on your file system
Ah gotcha
If you follow the installation guide you will have a disk with a working kali linux, make sure the grub is configured correctly
Will do ๐๐ผ thank you
From there it shouldnt matter much if you put it in computer XYZ
your welcome ๐
Ohh I didn't know that. I thought it would bug out since the installation was configured to that computers hardware
Nope that shouldnt matter
Sweet =]
Because everything that is persistent is on the disk itself
I see
What exactly is the point of assigning the arg1&2 and then reassigning it to the registers?
why not just do movl edi/esi -> edx/eax respectively right away
why is it just juggling variables/values around without doing anything to them
frame pointer and base pointer are the same thing if im understanding things correctly? frame/base pointer points at the frame being used and stack pointer just points at the top of the stack?
I'd assume you use the base pointer as a base for any pointer maths :)
is there a string where the md5 hash is the same as the string itself?
walking through this should give you a good idea that it isn't likely. http://practicalcryptography.com/hashes/md5-hash/
thank you
Any suggestions for tried and tested resources where I can learn data structures and algos from the ground up? To give myself a better overall picture of programming
The Corman book is a university standard.
I would expect it to be possible, finding it is another story though
Isn't K&R still a standard reference?
Can someone suggest me an project related to AI in cybersecurity ,in python
For C, one would want K&R. The Corman book is all data structures and algorithms. If you wanted to learn asymptotic analysis, you'd read Corman, not K&R.
The other good one is the red book, by princeton publishing
Walls & Mirrors isn't bad, it is way better at explaining 2-3 and self-balancing trees than most algo books are. W&M also isn't nearly as dense
the OpenGL Red Book? ๐
lol, this one: https://algs4.cs.princeton.edu/home/
i forgot about the openGL red book. I've called Sedgewick&Wayne the red book because it's cover is bright, eye searing red.
It's almost as memorable as the dragon book
yeah
I know how to convert ASCII letters to binary, but how does the computer know the binary numbers its reading, i.e. bits, are representing letters / words and not numbers?
It doesn't. It just "knows" they're bits and bytes.
The interpretation of the contents is solely on the responsibility of the operations done on the data.
makes sense
Higher level languages naturally provide convenience methods and utilities for this.
Hey, are there any iOS developers here who have experience with releasing apps to the app store?
Generally electricity :) a 1 will be a different voltage than a 0
Also context
I misread the question. But yeah it depends on the operation. It's all numbers at the lowest level
Even assembly is all numbers, as each function is represented by an opcode. This is how shell code basically works
yeah exactly. its all numbers. so its on the context of the application to translate the numbers back into letters once the operation has been executed, right
pretty much
thanks @brazen eagle
Gave +1 Rep to @brazen eagle
the function will translate at some level, or the terminal program will see a series of bytes and say ah, this is a / or this is a u, I should display that
Hey, I want to connect to a server with ssh and then copy a text file to my directory. What is the command to copy a file from the server to my computer?๐ค
What is your Host OS ; Windows or Linux ?
Linux
So scp should do the trick, I guess it's something like
scp username@vivid island:/path/of/your/file your/local/computer/path
With username & IP from your server
Oops someone is called IP here, sorry
Umm, first I shoul connect ti the server with ssh and then run scp?
Yep
What do you want to do exactly ? If I may ask
No, just run scp on the local computer. Not on the remote. You don't need an existing connection. (And this isn't really a programming question ๐ )
Umm. I tell you at #room-help
Yeah, sorry
๐
Happy #NationalCodingWeek ๐
Man python is a pain โฆall im trying to do is install my python appโฆ. If I was just trying to install it as a library I would be fine โฆ
It feels so good once you start to understand the language your learning
Just wish I would have learned sooner ๐ฉ
๐คจ
๐
๐ฆ
which distro is best
the one you like and gets your job done.
+you won't have to spend hours fixing it in a work day or study session
Is today mentorship day or smth?
nice profile pic. โwhoamiโ right?
every day is mentorship day
the 'best' distro is the one that gives you the environment you want with the least amount of fixing.
is there any resource to make a file forbidden on the webserver?
Depends on your environment. What are you working with?
I am gonna need to read something from a file in the website, then try processing it, but I need to make the file inaccessible from outside
I think ur question were different, but eh
That tells me nothing about your environment. Linux? Windows? Apache? IIS? Nginx? Python WSGI? Express?
can't you just move that file out of the webroot, and hard code the path in the script that works with the file?
Windows. Nothing special, no special technologies. Only jQuery and maybe could utilise some PHP somehow.
Also self-hosted with Live Server in VSCode
I don't have a clue how Live Server works, but either shift it outside the webroot or remove permissions for your user to read it.
@vernal thicket you could still do /../.., right?
Unless Live Server lets you configure rules
Not if Live Server has any kind of security to it
Live Server is just an extension that hosts the webserver on the 5500 port, and refreshes the page automatically when you make any changes to the files
Live server is great for dev work, but probably shouldn't be used to actually host anything
it's got zero security
I should've said "testing", sorry
I think you can share it over a sharing session though
I'll defer to your experience @brazen eagle. I dislike VSCode ๐คทโโ๏ธ
it's fine
Get your dev environment as close to your prod environment as you can
yeah but it's good for rapid prototyping
SELinux contexts will do what you are looking for, I think.
Not sure what the MS Server equivalent would be
Bear in mind that MS is completely broken...
So business as usual then ๐
Can't you use a .htaccess file to deny access to that file? Or does that also affect access from scripts on the server itself?
and if you can , does Live Server support .htaccess files?
dunno, never tried doing something that silly with live server
Those only work on Apache
Hence asking about environment
fair point. nvm than
Quick question - I'm trying to setup an Ubuntu Server at my apartment with an old laptop that I kept around, and I think I am running into a wifi problem on setup. The thing is when I logged into the wifi here the first time they had me log into their program via browser to complete the wifi connection. Well my Ubuntu server only has terminal so is there a way to either bypass or certify that checkpoint without downloading ubuntu as a desktop?
I don't know the answer to your question, but what you see when you are connecting to wifi is called a captive portal. Maybe that will help you find the answer.
some of those captive portals allow you to whitelist mac addresses for an account, it completely depends on the providers configuration
Hmm.. maybe you can use another pc and check the parameters in the request sent to the captive portal webpage during login process using burp suite. With that information use curl from your ubuntu server to login. Idk if this can work but just a suggestion.
Try using a text-based browser, such as lynx.
Does it work with a console mode browser?
Ah juun was faster... There's w3m as well if you don't like lynx
I haven't had a chance to try it yet but I will, thank you all!
hey guys anyone here good with react ?
Shoot your question if anyone knows will guide you
i created a modal for a post like if anyone wants to dislike the post then the modal pop up for notification to confirm that really wanna dislike and if person click on yes then i want to remove one like from the post and i have written modal code its working fine and previously i have written logic for like and dislike now the problem i encounter is that i want to connect that yes notification option with likes decrement
greate work
thanks
Gave +1 Rep to @queen gate
collabe me for create a app
sure no problem when?
ok join my server
wait currently i'm fixing my bug lol already with someone on server
you have experience android development
nope i'm working on web dev
ok
yes
where are you from
you might be searching fr=or react native?
india
greate
yes
how old are you
24
senior 
lol no i'm junior in tech field lol age dosent matter buddy you must be senior in knowledge
๐ i am 18
i am new adult
great bro the people on my server with i work they are just 15yr and know more than me
yup
and i'm learning from 20 yr boy and from 40yr guy so dosent matter
and i help 47yr female to learn all things and help her in errors lol
i also made three successful app
you also try my insta up app
great
due to some situation in afganistan i dont focus on my career
You're from Afghanistan?
I guess humanist
๐
yup
great bud
hello guys i need help in yarn actually i was creating react projects like npx CRA and now i want to switch to yarn and i tried with yarn but myZSH shows command not found do yarn need some installation before to use it? and if i install yarn then if for some reason i again want to use npm then will npm work or what will be the switching process between them?
should is run this command or not
npm install --global yarn```
did you run that?
npm is baseline with node, and the two are mostly interoperable
as the config is pretty much the same
any bash expert here
A lot are, it would be better if you just ask your question
this the question help me make this
{
read -p "Enter the IP: " IP
echo "The IP you are using $IP"
read -p "Enter the path to save Files : " PATH
echo "Selected Path : $PATH"
}
add_ip
ping $IP -c 1 | grep "1 received"
nmap = (nmap -sC -sV -p- -T4 -A -v $IP)
sudo dirsearch -u $IP > $PATH/
nikto -url $IP -C all
sublist3r -d $IP
gobuster dir $IP -w /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txt```
making conditions is pain i'm good at reading but making is pain ๐ ๐
i have so many ip's to scan if anybody can help me quickly ill be very thankful
have you heard of our lord and savior that is code blocks, wrap that monstrosity in ```
no put your code in ```
like this
ok
@graceful ginkgo https://github.com/Tib3rius/AutoRecon
If u don't wanna reinvent the bicycle
Tibs got u covered
@icy bobcat bro i have to comment ever line the one i dont want
i use mostly these 6 tools and make the record
of mountain of IP's
then do it manually
Then get comfy with ifs and functions in bash
Ok so the main issue you're going to face doing it in bash
There are like a million tutorials. You'll be fine
is you will hit one command, it will not progress until you get past that command
Which might be a good thing
And this is where you learn about golang, the fantastic language that can solve this with ease and threading
If it's a crazy fuzzer
Yare Yare Daze
Is this for corporate? Invest in an enterprise scan tool and save yourself time to make arguments that patching needs to happen.
Nope for my self
I'd use a command line parameter for inputs like ip addresses
Instead of a prompt
Autorecon does a bit of magic based on what nmap finds, iirc
Great tool though
This. It makes scaling your script much much easier when you use args vs input prompts.
Allowing it to be used with pipes is also neat
Yesh
Agreed.
ty ๐
Gave +1 Rep to @brazen eagle
โค๏ธ
I use it less than I probably should, and more than I want...wait invert that
@everyone Anyone interested in solving project euler problems DM me...
you don't need the everyone
well that is just the type of person they are
a person that tries to ping 87000+ people to have fun solving project euler problems
too much math for me tonight
๐
Anyone here good with python? struggling with an exercise
ask the question?
I did
oh...it didn't get posted
hold on
The exercise states Define an EXPECTED_BAKE_TIME constant that returns how many minutes the lasagna should bake in the oven. According to your cookbook, the Lasagna should be in the oven for 40 minutes. I do EXPECTED_BAKE_TIME = 40 and it says ImportError: cannot import name 'preparation_time_in_minutes' from 'lasagna' (.mnt.exercism-iteration.lasagna.py)
What am I overlooking?
where is it getting preparation time in minutes? whats your code look like?
wow well thats embarassing
no worries
this is how looking at code always goes
it happens, trust me
you get stuck, ask for help, realize it's something trivial that's hanging you up.... welcome to the pain ๐
thanks for the help guys
it happens to everyone, no need to be embarrassed
i once spent 10 hours troubleshooting why a C++ class wasn't compiling
turned out to be a missing semicolon
lol
so means we can use both with their commands no other setting needed to make them work?
I'd still choose one though
hmm
Mostly to be safe
yep right
yeah actually project should be run on one only but i was just making clear for me that after installing yarn are we able to make projects with both package manager or just with the current installed one
like one project with yarn and another with npx so i think both should work without any issue
should be alright
okay can you please also help me with bootable drive i want to format it i forgot what software i used to make it bootable last time so i want to make it normal now so whats the process for it?
I'm assuming that's a different beast, and might be a better job for google
okay and have you used differentt OS like my machine is old actually i3 6th gen with 4gb ram 1tb hd and currently i'm using ubuntu but its better than windows but still got freeze alot as you know ubuntu is also not lighter now i'm confuse that should is use linux mint cinnamon flavour or XFCE the lightest version ?
I'd say use what works ๐
lol
I mean the 4 GB RAM is a bit light
it's probably the main bottleneck, so something like XFCE might not be a bad idea
hey somebody tell me how can i make new dir and make separate files with different tools info in bash
-_-
๐
That is one confusing question
Can u elaborate with an example orr something?
What is different tools info supposed to mean?
mkdir 10.10.10.10 > nmap.txt,nikto.txt etc.
You would probably have to call each tool separately and just throw the output into the file?
dm.
mkdir $IP
nmap $IP > $IP/nmap.txt
I donโt program bash, thatโs just my best guess:)
you could use the -o flag for nmap ๐
-oN
Ah yeah, I type it every time and yet I still forget
looking for some assistance on this python problem. question says Define an EXPECTED_BAKE_TIME constant that returns how many minutes the lasagna should bake in the oven. According to your cookbook, the Lasagna should be in the oven for 40 minutes: I put def EXPECTED_BAKE_TIME(): which gives me the error "ImportError: cannot import name 'bake_time_remaining' from 'lasagna' (.mnt.exercism-iteration.lasagna.py)"
there isn't any option for me to upload an image here. https://imgur.com/RUXQzy7
!docs verify
And is this a school assignment?
Also that's not how you define a constant in python.
no
What's the assignment/questions from?
A website called exercism
Ok. Research how to define a constant in python.
Also are you back on an alt or something?
I always thought Constants and Variables were the same I guess I was wrong
Well, you defined a function.
So that was neither.
Well I tried a variable earlier and I tried what I thought was a constant as well but I'm guessing now I may have set that up wrong
def name(): is for functions.
yeah I know I've just been trying different things
also sorry for the confusion on the different profile switch its not intentional I have multiple browsers and apps open right now @onyx merlin
Ok, but this is where research comes in
Hi ! Any of you aware of a way to retrieve UEFI boot order infos with either C# or powershell ? I'm at loss right now
Yeah I tried this module and it doesn't work, I'll give it a try again but from what I read it was for an exercice and it might be that the dev isn't maintaining it
wdym by it doesn't work?
What exactly would be a good way of finding out an error within a tree to see if it actually is a valid tree?
@graceful ginkgo - what command are you using for the scan? What level of -v do you have?
for example if you are using -vv try -v instead
Try to not to put -v argument, but if you want a little bit of information put -v, not -vv, i think you used it with two vv.
You're going to have to be a lot more specific with your questions if you hope for an exact answer.
PS: I do not want to use selenium for now
From the day i started till today i never used -vv
if you use -v try to get rid of it and try again.
I want to short the output using cat or awk but I'm not good at it thats why i asked you guys to give hand here
you can use cut or awk, but cut use one character as a delimiter, on the other hand, awk uses multi-character as a delimiter, you can use whatever you want i will give you an example on both
echo "hi all foo bb" | cut -d " " -f 1
this will output "hi" as a result
echo "hi all foo bb" | cut -d " " -f 2
this will output "all" as a result
========================
echo "hi all foo bb" | cut -d " " -f 3
this will output "foo" as a result
What about multiple lines
multi lines you can use awk for this is an example
echo "welcome all TRY THIS another foo" | awk -F 'TRY THIS' '{print $2}'
this will print "another foo"
echo "welcome all TRY THIS another foo" | awk -F 'TRY THIS' '{print $1}'
this will print "welcome all"
come
Maybe a bit late but nano .zshrc will do the trick I guess ?
Hey peeps. I wrote a little 160 line python script for Linux that lets you scan for then take over the keyboard for a Roku device on the network. I don't know if this is the place to link it, but if anyone is interested in it and could give me feedback that would be dope! https://github.com/wsmaxcy/RokuTyper
Hi everyone, was doing the room on Escaping Vi Editor to get shell. the syntax was "sudo vi -c ':!/bin/sh' /dev/null" Can anyone explain why is it necessary to have /dev/null I think i have seen /dev/null in other shells and was wondering why we need to output stuff to null
I don't know the reason exactly but usually using /dev/null on shells is to get rid of the errors. Some shells I have used will blurt out errors each command, no matter whether it's right or wrong.
ahhh makes sense, thank you sir!
Gave +1 Rep to @true pumice
Someone program in rust language?
anyone know c++?
If there is any questions behind it please ask it directly, don't ask to ask 
using namespace std;
int main ()
{
double numFirst;
double numSecond;
cout << "Please enter the first number" << endl;
cin >> numFirst >> endl;
cout << "Please enter the second number" << endl;
cin >> numSecond >> endl;
return 0;
}```
why am i getting an error here?
What's the error you are getting?
I'm garbage at C++ so I won't be able to assist you further 
its a whole lot but this is the first one
ah i cant post images
could not be resolved; did you mean to call it?
cin >> numFirst >> endl;```
So that makes sense. Have you looked at ifstream where cin resides? That will likely give you some deeper info on why it's breaking.
๐
Isn't this line trying to write a double into numFirst, and then something into endl?
It's mixing operators
std::cin is an input stream, using << attempts to feed the std::endl into an output stream. The two categories of stream objects aren't compatible in that way.
!docs verify
Once you're verified you'll be able to
Hi boiz!
Suggestions to a python project on cyber security stuff? (e.g portscannerโฆ)
The biggest JavaScript conference is now coming to India โNovember 15 2021
Join the very first Indian edition of the most prestigious JS conference from the International JavaScript community. An International 1-day conference.
Book your tickets today -www.jsconf.in
Know more here - https://blog.jsconf.in/announcing-jsconf-india-2021-c00ecf4...
Jsconf coming to india!!
JSConf India is the first-ever conference happening in India on 15th November 2021 for Javascript Developers
If anybody here familiar with Java/Kotlin for android
i need some help for my project (we can negotiate about terms of the work)
please dm me if you are interested
am familiar, no I won't do your homework for you
If this is for a job interview you need to solve this yourself. If someone helps you, you are mis-representing your skills and essentially lying to your employer
yeah we aren't going to help you with interview questions, though the distribution of notes makes a simple algorithm optimal
If you lack the skills to solve the interview challenge, then how are you going to perform the job, which is likely to be much harder?
There's literally 0 point to cheating.
yup
You're just digging yourself a nasty hole that you do not want to be in.
also I suggest you properly read the instructions ๐
the job does not require this amount of coding at all. idk why they ask this
because it's an algorithms question, not a coding question.
That's not going to change my response. Your potential future employer is gauging your skill level for a reason
i can see how the function works but struggle to implement it
sorry mate, won't help. And I'll mute any that does
Keep in mind that some employers will still hire you if you're underskilled, and then train you. Don't cheat your interview challenge, it's going to make them think you don't need training and they're going to assign tasks to you that are above your skill level.
you'll have to figure it out on your own. might steal that question for later though
I mean it's basic CS so
If you lack a compsci or math background, these questions may be out of your skillset. If that's the case, your best bet is to ask a lot of questions and show your thought path to approach this kind of question.
might be tricky given that it's an automated test
in any case there are multiple possible solutions, some more optimal than others
both of those statements are true
remember that the naive brute force approach is always an option in algorithms questions. the question is just asking for a solution, not an optimal or approximately optimal solution
yup
I mean I'd probably brute force first to make it work, then figure out the cute method
I had 2 ideas on how to do this right now, though both are variants on the same theme
it's a really common algorithms problem
yes
it's been taught in a slightly different way in every DS&A class I've taken or been a TA for
it's a problem that u can find in youtube
the recursive memoization explanation is easier to grasp.
you're not helping
No one should be helping honestly 
from the UI i believe it's hackerrank.
could be
100% certain. i am doing interviews as well 
but as it's an interview question, we aren't helping
aye aye cap
i would like to think that hydra and i weren't helping, we were halping ๐
if they figured out what we were talking about from that, then they should be able to code the thing
lol now i read the conversation after the image lmao
i saw the image and replied first.
ye
yeah sorry
would you like your mute now or later? ๐
was about to nuke it but that works too
I created python program to perform various opration on array using if and elif to make it user intertactive but it exit after 1 input does not prompt again to perform another opration instead it exit
how i keep it running until user choose exit option
I know how to do it in other languages using switch but don't know in python
I m learning python
Use while loop maybe?
If you are asking about a switch statement, that doesn't exist in python.
oh snap. is that in any repos yet?
Yeah, I just read the official 3.10 changelog. It'll be interesting to see benchmarks of advanced match cases
Gave +1 Rep to @magic falcon
Thanks i got logic to get it done without switch case aka match case in python
Gave +1 Rep to @remote echo
You will need a while loop
# A simple example
while True:
ask = input("blah?: ")
if ask == "exit":
exit_the_program
Change exit_the_program to break?
it depends how the program is structured, it seems that he wants to exit the program once a user types exit so sys.exit() is probably more suited, break just breaks out of the loop.
๐
You understand where Iโm coming from, right? :)
Yeah ๐
pattern matching / switch case will be in python 3.10
definitely the best feature in 3.10
pattern matching is already in python. RE is already a library... You mean the syntax to support a switch(){ case ... } type of construct
We're past 3.0?
typo, I meant 3.10 ๐
yeah
guys does anybody knows any Discord server specific for Java Developers?
I'm having a bit of an issue. I was wondering of perhaps someone here can help me out with that.
I'm trying to make a visual editor for some game (DayZ), which uses a lot of XML files. I felt like entering coordinates in text sucks as I have to teleport around the map, copy them down, tab into the text editor, enter them... the whole process takes forever.
There is a website where you can view an online map. The map is served as 256x256px images for various zoom settings. I made a python script to download the map images. Works fine.
I then made a winforms project in C# to stitch the map back together using Magick.Net (ImageMagick) and load that into a picturebox control. I wanted a drag and drop type control that slews the image by whatever amount the mouse moved while the mouse button is down.
The actual issue is that this slewing, while it works in principle, is very janky, jumping back and forth. I have no idea why that is.
I am using mouse events on the picture box itself for the slewing. On mouse down I set a boolan, on mouse up I reset it. On mouse move I update the coordinates of the viewport if the boolean is set.
Would someone be kind enough to have a look or maybe suggest how I can find out what goes wrong? The thing is that step by step debugging really doesn't work since the issue is sporadic. The picturebox generates many mouse move events and stepping through them all is really unfeasible.
Code available here: https://github.com/FalcoGer/DayZ-Editors
If you want to check it out, I recommend you remove all but one map from the json file in Assets/Maps/ so you don't download the whole 3GB image database. swansisland is the smallest since it only has 6 zoom settings.
I already tried putting a lock statement inside every mouse event function and the update function which creates the new image.
it didn't have any effect on the bug so I removed them again.
i have gone through some of the code.. specially dayzmapview.cs.. now i think the problem is timer and mousemove.
generally for draggin you update the view on the mousemove event. but u are not doing that instead it's delegated to the time tick with the updateNeeded flag.
i would suggest in time_tick check for slewing if it is false then do whatever u want and use the update() in the mousemove event.
tho i don't know if it will work tho
so
How important is learning SQL in order to perform SQLi attacks? Should i touch up on the basics of the language or do i just need to understand one or two things? Hope this question makes sense
You ideally want to be able to query a database and interpret queries comfortably
fixed it.
@tepid cargo the issue was with calculating the delta outside of slew from the mouse position. the viewport changes but the position of the mouse on the map doesn't. I don't know exactly what caused it but in my dreams i had the revelation that i should calculate the delta in the slew function and make it absolute rather than relative. and now it works. yay.
Hi, how can I list the ip address of every device in a network via python?
Why?
cuz I need this to a project
i want to boardcast a message to every device in a network
Why?
will you help me or not?
I need to know your intentions:)
its for a final project of school
Hmm, we usually don't help with school projects
so consider this as a standalone project that is not connected to the project of school
Too late 
Well, is it a standalone project that's not connected?
I will make it one
ICMP is a pain in the arse in python... I tried
Please just as k your question
If it's something you shouldn't be asking about (i.e. cheating) then we aren't helping in DMs either ๐คทโโ๏ธ
If it's not sensitive, or is a generalised programming question then just post it here. Might help others down the line
Does anybody worked with Accessibility service in android? Does it just prompt for user permission granting or it just opens and let user decides with the options?
hello, everyone. can anyone help me to understand what is logging in python??
as in logging to file? logging to console? logging in general?
Chocolate Log ๐ซ
Good day to all of you.
I'm using NodeJS crypto and PHP sodium but I encountered this error
Uncaught SodiumException: scalar and point must be SODIUM_CRYPTO_SCALARMULT_SCALARBYTES
This is my javascript Code
const { publicKey, privateKey } = generateKeyPairSync('x25519', {
publicKeyEncoding: {
type: 'spki',
format: 'der'
},
privateKeyEncoding: {
type: 'pkcs8',
format: 'der'
}
});
And this is my PHP, the value of $fromJavascript is the publicKey of Javascript I'm just pasting it as of now because I'm experimenting with different libraries.
$fromJavascript = "****";
$bob = sodium_crypto_box_keypair();
$bobPB = sodium_crypto_box_publickey($bob);
$bobsharedKey = sodium_crypto_scalarmult(sodium_crypto_box_secretkey($bob), $fromJavascript);
Can you help me guys?
is there an actual question in all that? not sure I follow exactly what you're trying to do here. Is there any specific error?
Ohh sorry, the sodium_crypto_scalarmult() is throwing an error
Uncaught SodiumException: scalar and point must be SODIUM_CRYPTO_SCALARMULT_SCALARBYTES
Then convert it?
I tried converting it to base64, hex but it's the same error.
The docs says the sodium_crypto_box_keypair generate X25519 key pair which is the same with my javascript generateKeyPairSync
what is threading in python?
Pretty much the same as it is in any other language
I don't have much experience with other programming languages
Ok, it's best to learn the high level concept before starting with threading in Python
Threading is something I really wouldn't recommend for beginners
๐
hello someone can help me recover my password from my email please
@shrewd oracle We don't do that here. Talk to the company
Need to retrieve extension version /ID of simplexml by phpinfo() function
Can anyone help with the syntax?
Doing rfi
how can i add a start button to my game in js
How much do you know about web based applications?
So that's not just adding a button. That's a different issue.
How does a client communicate to the server?
the button on click trigers a function, which makes the button dissapear and the game start
Web applications are stateless.
at game end it reappears
var character = document.getElementById("character");
var block = document.getElementById("block");
var counter = 0;
var start = 2
function jump() {
if (character.classList == "animate") { return }
character.classList.add("animate");
setTimeout(function () {
character.classList.remove("animate");
}, 300);
}
document.addEventListener("keyup", event => {
if(event.isComposing || event.keycode == 32) {
jump()
}
})
var checkDead = setInterval(function () {
let characterTop = parseInt(window.getComputedStyle(character).getPropertyValue("top"));
let blockLeft = parseInt(window.getComputedStyle(block).getPropertyValue("left"));
if (blockLeft < 20 && blockLeft > -20 && characterTop >= 130) {
block.style.animation = "none";
alert("| Game Over | Score: " + Math.floor(counter / 100) + " |");
counter = 0;
block.style.animation = "block 1s infinite linear";
} else {
counter++;
document.getElementById("scoreSpan").innerHTML = Math.floor(counter / 100);
}
}, 10);
function start() {
return;
}```
start() comes up as "not a function"
start comes up as undefined even thoughit has correct syta
syntax
Because it does nothing
What do you mean when you say it comes up as undefined?
Where are you seeing that?
No, it's defined.
The function start does nothing
Yeah but it returns nothing
It returns undefined. It is not undefined.
This is why we need context.
The fact it does nothing is not important.
Try adding return 'define me'
No, the return value of the function is undefined.
THE FUNCTION IS DEFINED.
But the function itself is undefined this is point-blank wrong
Sorry, I misunderstood
salu a tous
i figured it out
i had a function and a var both named start
so it came as undefined
Generally a bad idea yeah
Hi, i need help with a python program. Nothing related to Hacking/scripts.
Please help.
Just ask your question
Hey folks!
Sorry for asking a stupid question. I have an output like this:
https://www.mrc.org.pk/ [88.151.101.9]
I want to fetch only IP 88.151.101.9?
I know it can be done using regex but i'm not able to get this.
Thanks in advance
I'm using httpx for finding IP's
cat domain.txt | httpx -ip
but it gives me the output with URL I only want IP.
Honestly regex of "anything between [ and ]" is going to be the easiest
Thanks
Gave +1 Rep to @onyx merlin
Does any one know a better tool than httprobe and httpx for finding live sites out of the list of subdomains.txt
I've used httprobe and httpx but i didn't get rich results. I only get 30,000 live sites out of 1.5 lac subdomains.
Or how to use httprobe and httpx more efficielty to get more results.
I've used the following commands:
httpx -l domains.txt -o live.txt
cat domain.txt | httprobe > live.txt
anyone familiar with ios app development?
Anyone here please help me to erase linux mint and install manjaro in system please
My system is showing different options than tutorial video
I mean you can probably use sockets if you just want to check liveness
Or query dns I guess
Which video did you try to follow ?
You just have to delete the partition where Mint is on and create a new one iirc
During the installation process
one from the downloading page of manjaro and two three more
there is no media upload option in this server other wise i can put screenshots
!docs verify
Follow it then you'll be able to send ss
and you should go to #infosec-general as this is not the right place I think
not so programming related
ok
are there any other built-in node modules than child_process we can use to run shell commands?
or does anyone know if express has any functions to run shell commands?
hello i have a problem i made a program using c# and i want to make it anti-decompiled and i found confuserex on github i downloaded it but i dont know how to install it or run it can anyone please help me by tellimg me what to do or by sharing a video with me?/
any code wars websites?
look at the docs. Others are spawn() fork() exec() and execFile()
This is the lambda function
exports.handler = async (event, context) => {
console.log("Define Auth Challenge: " + JSON.stringify(event));
if (event.request.session &&
event.request.session.find(attempt => attempt.challengeName !== 'CUSTOM_CHALLENGE')) {
// We only accept custom challenges; fail auth
event.response.issueTokens = false;
event.response.failAuthentication = true;
} else if (event.request.session &&
event.request.session.length >= 3 &&
event.request.session.slice(-1)[0].challengeResult === false) {
// The user provided a wrong answer 3 times; fail auth
event.response.issueTokens = false;
event.response.failAuthentication = true;
} else if (event.request.session &&
event.request.session.length &&
event.request.session.slice(-1)[0].challengeName === 'CUSTOM_CHALLENGE' &&
event.request.session.slice(-1)[0].challengeResult === true) {
// The user provided the right answer; succeed auth
event.response.issueTokens = true;
event.response.failAuthentication = false;
} else {
// The user did not provide a correct answer yet; present challenge
event.response.issueTokens = false;
event.response.failAuthentication = false;
event.response.challengeName = 'CUSTOM_CHALLENGE';
}
return event;
}
I am getting the following error
I created a rest api to the lambda function, but when I am trying to access the url, I am getting the above error
Could anyone help me resolving this issue
Shall I sent another pic?
Could you help me how to solve this, I am bit weak in js ๐ฆ
Basically I deployed the following git repo
It creates 6 lambda functions and 2 S3 buckets in our aws account
Now I need to create REST API to those 6 lambda functions, I created one REST API to one of the functions, then if I access the invoked url, I am getting that error
Sounds like you shouldn't be using a language that you're not confident in
Get confident first, them big projects
Only this part of my work is on JS, remaining work I completed in Py
If you're not confident in JS, don't use JS.
ok
can not read property of undefined means the property is not defined so you should look to the left of that property in this case request so do a console log for event.request
also use backticks in discord for code highlighting ๐
I'd guess challenge as in challenge-response rather than CTF
your event.request isn't defined, I'd look into that first
it means the object that you're trying to get a property from is not defined
yes that ^
Smh I said this
Could you please tell how to define it
looks like it's something that's sent to your handler
Can I dm you, if you don't mind
nah, I'm busy atm
Ok
I have 6 lambda functions. I need to create rest api to it, I created for one and tried to access the url
It gave that error
i am not good with aws lamda but are you not supposed to define the events in ur sam yaml file?
The object describing an Api event source type. If an resource is defined, the path and method values must correspond to an operation in the OpenAPI definition of the API.
or u need event.json?
Below is a sample AWS SAM template for the Lambda application from the tutorial . Copy the text below to a file and save it next to the ZIP package you created previously. Note that the Handler and Runtime parameter values should match the ones you used when you created the function in the previous section.
If it's ok for you, can I dm you ? @tepid cargo
there is a very good chance that i will not be able to reply. so if u have questions put it here so that any one of us can reply. there are some highly highly (wayy more than me) experienced devs here like hydra or juun..
I have 6 lambda functions and few other resources in one lambda application. Can we create an API to the application, or do we need create api separately to all functions?
You can do either, it depends entirely on what you want to happen ๐
If your application is like:
Buy Food
* Count money (lambda 1)
* Calculate change (lambda 2)
You can certainly use one API to the application lambda which internally calls the other lambdas (you do not need an API-gateway to do this, you can use the step functions in lambda i believe)
Yes I want to create one api to the application instead of separately. Could you please tell me how to create for application
I checked for separately, but I am not getting how to do for application
Please help me by telling how to create an API for application (which has lambda functions and S3 buckets in it)
when a function is called,its stack frame is set up,i want to know whether the return address of the function lies within the stack frame or outside?
Within
https://m.youtube.com/watch?v=75gBFiFtAb8
watch this video at 4:54 ,the person is saying something different
Yes it's within
guess it depends on how you define the context of the stack frame
Can't we create an API to application directly similar to creating to single lambda function??
what do you mean?
normally yes? that's the point of a microservice, or any backend really
Means can we create an API to the lambda application
Instead of one api for each lambda function separately
why not?
it depends on your use case
you'll have to interface with the lambdas regardless
get the pen and paper out and draw out your use cases
it'll help define your architecture I think
The functionality is like, it's for face authentication. For signing in, the lambda function matches the user face with the one in S3 bucket. If sign-up, then the camera will take a photo and store it in one S3 buckets
1st bucket: Stores photos while logging in
2nd bucket: Stores photo while registering
probably don't want to store the photo for login
and when registering you'll likely want to store some form of hash made from your key data points rather than the photo itself
regenerate that hash and compare those for login
Yup... But this is readymade git repo of Amazon. I deployed it. Now need to create rest api
ah ok
So my task is to create api without modifying the functionality
ok so you want something in front that'll call your lambdas while exposing an API for the end user, yes?
Yes
I can see 2 use cases that you described: Login and Register
sounds like the beginnings of an API to me
are you constrained by language, as you'll have some code to write?
I am presently good at python and Java
For creating api for one lambda function, we can use api gateway in AWS console. So similarly can't we create api for lambda application using api gateway
on the Java side I'd say use Spring Boot. not my favourite, but it's sufficiently well known to have lots of resources around. For python, anything based on Flask should be fine
Ok...will try
if you want to have a bit of fun, Quarkus is an interesting new-ish framework
don't know how it integrates with Lamdba though, I assume you call an endpoint to call the function, yes?
Yes, the invoked url calls the function
ok so you'll need a REST client
Yup
both Spring and Quarkus provide one
Ok
and for Python, requests is good
Thanks for your help friend ๐, I will try that
good hunting
๐๐
๐ There are 6! good first issues on the PyWhat repo if anyone wanted to get a free shirt this Hacktoberfest! ๐ https://github.com/bee-san/pyWhat/issues?q=is%3Aissue+is%3Aopen+label%3A"good+first+issue"
Hi lads, I've made some small projects on some stuff networking in python.
Thought It would be cool to share with you guys:
https://github.com/eliran3/Projects
So self promotion is generally frowned upon. That said, why is there an infinite busy-wait loop in your main?
isn't the return address pushed prior to the frame being created?
something to look up
your project is impossible to set up on Windows
poetry keeps eating dirt
i want to know the difference between buffer and stack,and the difference between buffer overflow and stack overflow, i tried searching it on google but there wasn't any satisfactory explanation.
This seems like a homework question.
yes poetry barely works on windows ๐ฆ
https://en.wikipedia.org/wiki/Stack_overflow
https://en.wikipedia.org/wiki/Buffer_overflow
I hate to do this, but reading even just the intro of each article will be a good start
In software, a stack overflow occurs if the call stack pointer exceeds the stack bound. The call stack may consist of a limited amount of address space, often determined at the start of the program. The size of the call stack depends on many factors, including the programming language, machine architecture, multi-threading, and amount of availab...
In information security and programming, a buffer overflow, or buffer overrun, is an anomaly where a program, while writing data to a buffer, overruns the buffer's boundary and overwrites adjacent memory locations.
Buffers are areas of memory set aside to hold data, often while moving it from one section of a program to another, or between progr...
is it possible to screenshot a webpage in python without importing external libraries?
i can't seem to find anything
Sure: write your own library
You'd need some HTML renderer, or headless browser
^^^
There are some good libs that make that simpler, I was reading about one earlier
Neither of which are inbuilt
hmm oke
